Skip to content

Instantly share code, notes, and snippets.

@cam-gists
Created June 20, 2012 22:01
Show Gist options
  • Save cam-gists/2962495 to your computer and use it in GitHub Desktop.
Save cam-gists/2962495 to your computer and use it in GitHub Desktop.
MySQL : Remove Duplicates
DELETE FROM table1
USING table1, table1 as vtable
WHERE (NOT table1.ID=vtable.ID)
AND (table1.field_name=vtable.field_name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment