Mysql
 sql >> Database >  >> RDS >> Mysql

Elimina in modo selettivo i record per lo più duplicati da MySQL

DELETE t1
    FROM YourTable t1, YourTable t2
    WHERE t1.part_number = t2.part_number
        AND (t1.price, t1.id) < (t2.price, t2.id)