Skip to content

Instantly share code, notes, and snippets.

@niranjanshr13
Created February 21, 2017 04:39
Show Gist options
  • Save niranjanshr13/dab74972f0c386e8ae51d4a980ba5c43 to your computer and use it in GitHub Desktop.
Save niranjanshr13/dab74972f0c386e8ae51d4a980ba5c43 to your computer and use it in GitHub Desktop.
removing duplicate sqlite3
DELETE FROM <table_name> WHERE rowid NOT IN (SELECT min(rowid) FROM <table_name> GROUP BY <column_one>, <column_two>);
# reference:
https://dba.stackexchange.com/questions/116868/sqlite3-remove-duplicates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment