Created
May 28, 2010 15:09
-
-
Save aderyabin/417273 to your computer and use it in GitHub Desktop.
Remove duplicates from table
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
SHOW CREATE TABLE old_table; | |
INSERT INTO new_table SELECT DISTINCT * FROM old_table; | |
DROP TABLE old_table; | |
RENAME TABLE new_table TO old_table; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment