/ Published in: SQL

this will delete where uniqueField is greater
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
DELETE T1 FROM MyTable T1, MyTable T2 WHERE T1.dupField = T2.dupField AND T1.uniqueField > T2.uniqueField
URL: http://www.cryer.co.uk/brian/sql/sql_delete_duplicates.htm
Comments
