<l__q> How do delete in column all duplicate ID's and leave just one?
<threnody> !t l__q about dupes
<ubiquity_bot> l__q: find them with SELECT COUNT(*) as qty,dupefield[,otherfields] FROM table GROUP BY dupefield[,otherfields] HAVING qty > 1
<threnody> !t l__q about delete dupes
<ubiquity_bot> l__q: If you have a unique ID and the name may contain duplicates then DELETE t1 FROM table1 AS t1 JOIN table1 AS t2 ON t1.id>t2.id AND t1.name=t2.name; If you have other fields that need to be taken into consideration extend the join as needed. If it fails on a myisam table see
http://bugs.mysql.com/bug.php?id=28837<threnody> l__q: if you don't care which rows are deleted you can just do ALTER IGNORE TABLE foo ADD UNIQUE(`col`); <-- that will add a unique index on the column in question and drop duplicate rows
<threnody> l__q: backup first, of course