Last active
January 3, 2016 21:09
-
-
Save pcalves/8519805 to your computer and use it in GitHub Desktop.
Delete duplicate entries in a table (MySQL).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM table | |
USING table, table t2 | |
WHERE table.id > t2.id | |
AND table.`column` = t2.`column` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment