当前位置:Gxlcms > mysql > MySQL多字段重复记录淘选

MySQL多字段重复记录淘选

时间:2021-07-01 10:21:17 帮助过:5人阅读

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)

人气教程排行