-
-
Save akinozgen/2821fef804a52370efc84393aac77dc0 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