sql >> Base de Datos >  >> RDS >> Mysql

Eliminar datos duplicados de una tabla usando MySQL

Pruebe esta consulta -

DELETE t1 FROM studios t1
  JOIN (SELECT MIN(id) id, name, email FROM studios GROUP BY name, email) t2
    ON t1.id <> t2.id AND t1.name = t2.name AND t1.email = t2.email;