delete (mostly) duplicate entries

Sql code posted by dieter
created at 10 Sep 00:32, updated at 16 Sep 13:59

Edit | Back
1
2
3
4
delete T1
from MyTable T1, MyTable T2
where T1.dupField = T2.dupField
and T1.uniqueField > T2.uniqueField
108 Bytes in 3 ms with coderay