I have 511 duplicates in my table, I need to delete these, but not the originals. Therefore I want to delete every second occurrence of every duplicate.
How can I do this?
TABLE:
code / status / time
E3F4FF928A / 0 /
07D95444BB / 0 /
07D95444BB / 0 /
40006C128F / 0 / 1315293012
2B45790E52 / 0 /
40006C128F / 0 / 1315293012
add a unique index to the table on the column that should be unique, and ignore errors
http://dev.mysql.com/doc/refman/5.1/en/alter-table.html