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

页面导航:首页 > 数据库 > Mysql > Mysql去除重复值列,只保留一条

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

来源: 作者: 时间:2016-02-18 10:28 【

Mysql去除重复值列,只保留一条1DELETE2FROM3 software USING (software,(SELECT DISTINCT min(id) AS id, ident FROM software GROUP BY ident HAVING count(1) 1) AS t2)4WHER...
Mysql去除重复值列,只保留一条
 
1
DELETE
2
FROM
3
      software USING (software,(SELECT DISTINCT min(id) AS id, ident FROM software GROUP BY ident HAVING count(1) > 1) AS t2)
4
WHERE
5
      software.ident = t2.ident
6
AND software.id > t2.id;

 


Tags:

文章评论

最 近 更 新
热 点 排 行
Js与CSS工具
代码转换工具

<