Delete duplicate rows in mysql based on a column value

by rajesh 2008-10-26 15:46:27

Just there queries will be needed to delete duplicate rows from mysql.

The duplicate rows can be any row based on any condition

CREATE TABLE tab_temp AS SELECT * FROM tab WHERE 1 GROUP BY colname;

DROP TABLE tab;

RENAME TABLE tab_temp TO tab;

Tagged in:

1720
like
0
dislike
0
mail
flag

You must LOGIN to add comments