Home >Database >Mysql Tutorial >Mysql去除重复值列,只保留一条_MySQL

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 13:32:041048browse

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
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn