“eliminar duplicados mysql” Código de respuesta

mysql eliminar duplicados

DELETE c1 FROM tablename c1
INNER JOIN tablename c2 
WHERE
    c1.id > c2.id AND 
    c1.unique_field = c2.unique_field;
Matteoweb

mysql eliminar filas duplicadas pero mantén una

DELETE c1 FROM contacts c1
INNER JOIN contacts c2 
WHERE
    c1.id > c2.id AND 
    c1.email = c2.email;
Stefan Schnabeltier

Cómo eliminar todos los elementos duplicados en MySQL

DELETE FROM FriendsData WHERE fID 
       NOT IN ( SELECT fID FROM FriendsData 
                   GROUP BY UserID, FriendsUserID, IsSpecial, CreatedBy)
Mobile Star

eliminar duplicados mysql

DELETE c1 FROM addresslist c1
INNER JOIN addresslist c2 
WHERE
    c1.id > c2.id AND 
    c1.`city` = c2.`city` AND
    c1.`province` = c2.`province` AND
    c1.`pgiRegion` = c2.`pgiRegion`
Uninterested Unicorn

mysql eliminar filas duplicadas excepto una

DELETE FROM NAMES
 WHERE id NOT IN (SELECT * 
                    FROM (SELECT MIN(n.id)
                            FROM NAMES n
                        GROUP BY n.name) x)
masterDev

Eliminar el valor anterior duplicado en mysql

DELETE `yellow_page_content`
   from `yellow_page_content`
  inner join (
     select max(`id`) as lastId, `code`
       from `yellow_page_content`
      group by `code`
     having count(*) > 1) duplic on duplic.code = yellow_page_content.code
  where yellow_page_content.id < duplic.lastId;
Blue-eyed Bison

Respuestas similares a “eliminar duplicados mysql”

Preguntas similares a “eliminar duplicados mysql”

Más respuestas relacionadas con “eliminar duplicados mysql” en Sql

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código