Skip to content

Instantly share code, notes, and snippets.

@pcalves
Last active January 3, 2016 21:09
Show Gist options
  • Save pcalves/8519805 to your computer and use it in GitHub Desktop.
Save pcalves/8519805 to your computer and use it in GitHub Desktop.
Delete duplicate entries in a table (MySQL).
DELETE FROM table
USING table, table t2
WHERE table.id > t2.id
AND table.`column` = t2.`column`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment