Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Encontre duplicatas ou mais no Mysql, exclua-as, exceto a primeira entrada

 DELETE FROM `80dage_garmin_track` t1
 WHERE EXISTS (SELECT 1 from `80dage_garmin_track` t2
          WHERE t1.Length = t2.Length
           AND t1.Time = t2.Time
           AND t1.idgarmin_track > t2.idgarmin_track)