Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nhatnx/7ad37d6dfd3c2d3027b9c71c640bbee8 to your computer and use it in GitHub Desktop.

Select an option

Save nhatnx/7ad37d6dfd3c2d3027b9c71c640bbee8 to your computer and use it in GitHub Desktop.
[MySql] Remove duplicate rows based on one column value
DELETE t1 FROM table t1
INNER JOIN table t2
ON t2.refID = t1.refID
AND t2.ID < t1.ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment