Mysq去除重复值列,只保留一条

DELETE
FROM
      software USING (software,(SELECT DISTINCT min(id) AS id, ident FROM software GROUP BY ident HAVING count(1) > 1) AS t2)
WHERE
      software.ident = t2.ident
AND software.id > t2.id;

你可能感兴趣的:(Mysq去除重复值列,只保留一条)