[MySQL] How to remove duplicate rows- the fast way
Another straight to the point solution
![](foto/Duplicates-in-MySQL.jpg)
Method 1
Let's create a new unique index, like this:
ALTER IGNORE TABLE `mytab` ADD UNIQUE INDEX(`mycol`)
Method 2
Create a new table and copy content from old table to new one:
INSERT IGNORE INTO `mytab2`
SELECT * FROM `mytab`
Comments