Monday, January 7, 2013

MySql Delete duplicate entry by single SQL


MySql Delete duplicate entry by single SQL

The Following Sql helps to remove duplicate entry from mysql table.

DELETE T2
FROM   TABLE T1
JOIN   TABLE T2 ON (T2.value = T1.value )  AND
                   T2.TABLE_ID > T1.TABLE_ID);