Delete duplicate rows using DELETE JOIN
statement
MySQL provides you with the
DELETE JOIN
statement that you can use to remove duplicate rows quickly.
The following statement deletes duplicate rows and keeps the highest id:
The output is:
EXAMPLE :
DELETE t1 FROM
marriage_time t1
INNER JOIN
marriage_time t2
WHERE
t1.SRNO < t2.SRNO AND t1.EMAIL = t2.EMAIL
Post a Comment
0Comments