Remove duplicates rows in MySQL

Remove duplicate entries in MySQL:

 ALTER IGNORE TABLE RESIM.LOD_RANDOMRECORDSIM  
 ADD UNIQUE INDEX USERIDARTISTURI (USERID, ARTISTURI);  

If it is not working with InnoDB, execute the query below first:

 SET SESSION old_alter_table=1;  

Always backup before doing such kind of tasks...

No comments:

Post a Comment