Created
July 12, 2018 17:13
-
-
Save dsmrt/a4f6f267df0bc91654c474b397389891 to your computer and use it in GitHub Desktop.
Mysql - Remove duplicates by adding a unique key.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Reference: https://stackoverflow.com/questions/36647058/removing-duplicates-with-unique-index | |
ALTER IGNORE TABLE mytable ADD UNIQUE INDEX myindex (A, B, C, D); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment