Created
June 30, 2017 21:36
-
-
Save camarin24/8c9f85c51ed8d5619d92f85fb618f5f6 to your computer and use it in GitHub Desktop.
Delete duplicates rows in a 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
DELETE dupes | |
FROM MyTable dupes, MyTable fullTable | |
WHERE dupes.dupField = fullTable.dupField | |
AND dupes.secondDupField = fullTable.secondDupField | |
AND dupes.uniqueField > fullTable.uniqueField |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment