Query to delete rows with duplicate columns.
Say you have table1 with field_name which is having duplicate records, and if you want to delete rows with duplicate columns, you can use the below query.
Assumes that you have a unique id, ID and the duplicate row is field_name.
delete from table1
USING table1, table1 as vtable
WHERE (table1.ID > vtable.ID)
AND (table1.field_name=vtable.field_name)
Assumes that you have a unique id, ID and the duplicate row is field_name.
delete from table1
USING table1, table1 as vtable
WHERE (table1.ID > vtable.ID)
AND (table1.field_name=vtable.field_name)