You can delete row using INNER JOIN clouse. see following example:
1 2 3 4 5 |
DELETE t1 FROM table_name t1 INNER JOIN table_name t2 WHERE t1.id < t2.id AND t1.column_name = t2.column_name |
Suppose,
table_name = user
column_name = email
then the query is:
1 2 3 4 5 |
DELETE t1 FROM user t1 INNER JOIN user t2 WHERE t1.id < t2.id AND t1.email= t2.email |