Created
November 13, 2011 03:00
-
-
Save sabarasaba/1361520 to your computer and use it in GitHub Desktop.
Delete duplicates from a mysql table.
This file contains hidden or 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 someTable | |
| USING someTable, someTable as virtualTable | |
| WHERE (NOT someTable.id = virtualTable.id) | |
| AND (someTable.name = virtualTable.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment