Mysql
 sql >> Base de données >  >> RDS >> Mysql

Mysql supprimer les anciens doublons

Ce qui suit (non testé) devrait fonctionner :

DELETE FROM someTable WHERE EXISTS ( SELECT id FROM someTable AS subqTable WHERE
subqTable.id = someTable.id
AND subqTable.ean = someTable.ean
-- and other equality comparisons
AND subqTable.date AFTER someTable.date)