欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

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

程序员文章站 2022-04-28 11:47:17
...
bitsCN.com

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

1DELETE2FROM3      software USING (software,(SELECT DISTINCT min(id) AS id, ident FROM software GROUP BY ident HAVING count(1) > 1) AS t2)4WHERE5      software.ident = t2.ident6AND software.id > t2.id;


bitsCN.com
相关标签: software