Page 1 of 1

deleting duplicate rows

Posted: Thu Jan 25, 2007 3:16 pm
by GeXus
I have a table with a bunch of duplicate data that I want to delete there are too many to do one by one, is there anyway to do this outside of using temp tables?

Posted: Thu Jan 25, 2007 3:25 pm
by Burrito
it depends on what dbms you're using (version and type).

you could sub query for duplicates using a HAVING clause and then delete with a limit of 1.

Posted: Thu Jan 25, 2007 3:35 pm
by feyd
Self-joins can be used too.