+ 1
How to delete duplicate records in SQL
delete from EmpDup where EmpID in(select EmpID from EmpDup group by EmpId having count(*) >1)
2 Answers
+ 2
That'll delete all the repeated occurrences, not leave a unique record for each one of them. Is this what you wanted?
0
Use ROWID....
delete from EmpDup where rowid in (select max(rowid) from EmpDup group by EmpId having
count(*) >1);