January 22, 2012

Query to delete duplicate records from table using sql


Query to delete duplicate records from table using sql


 select * from test where exists (select * from test as t where test.id=t.id having count(*)>1 and min(t.id) !=test.id.);  


How to Remove Duplicates from a Single Column SQL Table

To Remove Duplicates from a Single Column Table in sql you can use temparary table concept and can try this way