Skip to content

Instantly share code, notes, and snippets.

@banditelol
Created April 14, 2020 08:38
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 banditelol/660a230dd3b94a4415c4fa9d161a5f18 to your computer and use it in GitHub Desktop.
Save banditelol/660a230dd3b94a4415c4fa9d161a5f18 to your computer and use it in GitHub Desktop.
Dedupe table by first backing it up to table_bak
DROP TABLE table_bak;
RENAME TABLE table TO table_bak;
CREATE TABLE table
SELECT DISTINCT *
FROM table_bak;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment