Home > Database > Mysql Tutorial > body text

MySQL多字段重复记录淘选

WBOY
Release: 2016-06-07 16:25:59
Original
1110 people have browsed it

MySQL多字段重复记录筛选 MySQL多字段重复记录筛选: select * from T_CELLID TC where (TC.MCC,TC.MNC,TC.LAC,TC.CELL,TC.LNG,TC.LAT) in (select MCC,MNC,LAC,CELL,LNG,LAT from T_CELLID group by MCC,MNC,LAC,CELL,LNG,LAT having count(*) 1) and TC.id

MySQL多字段重复记录筛选
MySQL多字段重复记录筛选:
select * from T_CELLID TC
where (TC.MCC,TC.MNC,TC.LAC,TC.CELL,TC.LNG,TC.LAT) in  (select MCC,MNC,LAC,CELL,LNG,LAT from T_CELLID group by MCC,MNC,LAC,CELL,LNG,LAT having count(*) > 1)
and TC.id not in (select min(id) from T_CELLID group by MCC,MNC,LAC,CELL,LNG,LAT having count(*)>1)

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!