Created
July 28, 2016 04:23
-
-
Save shakirullahi/3592b34900a5e49b4ce76fe181891eb7 to your computer and use it in GitHub Desktop.
delete duplicate rows except one with small id
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 n1 FROM names n1, names n2 WHERE n1.id > n2.id AND n1.name = n2.name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment