Skip to content

Instantly share code, notes, and snippets.

@camarin24
Created June 30, 2017 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camarin24/8c9f85c51ed8d5619d92f85fb618f5f6 to your computer and use it in GitHub Desktop.
Save camarin24/8c9f85c51ed8d5619d92f85fb618f5f6 to your computer and use it in GitHub Desktop.
Delete duplicates rows in a table
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