MySQL Delete dupes

My favorite way of deleting dupes (taken from the honorable #mysql on freenode)

If you have a unique ID and the name may contain duplicates then

DELETE t1 FROM table1 AS t1 JOIN table1 AS t2 ON> AND;

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


Popular posts from this blog

waoo port forwarding broken

My custom optimized build of PHP 5.5 & PHP 5.4

phpMyAdmin - The plain HTTP request was sent to HTTPS port