Posted By

samwa on 03/23/11


sql delete

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Delete duplicate rows from a table

 / Published in: SQL


this will delete where uniqueField is greater

  1. DELETE T1
  2. FROM MyTable T1, MyTable T2
  3. WHERE T1.dupField = T2.dupField
  4. AND T1.uniqueField > T2.uniqueField

Report this snippet  

You need to login to post a comment.