Return to Snippet

Revision: 43380
at March 23, 2011 02:19 by samwa


Initial Code
delete T1
from MyTable T1, MyTable T2
where T1.dupField = T2.dupField
and T1.uniqueField > T2.uniqueField

Initial URL
http://www.cryer.co.uk/brian/sql/sql_delete_duplicates.htm

Initial Description
this will delete where uniqueField is greater

Initial Title
Delete duplicate rows from a table

Initial Tags
sql

Initial Language
SQL