查询数据库重复记录

select * from iw_user where cert_no in (select cert_no from iw_user group by cert_no having count(cert_no)=2)
View Code

一开始用>2,结果出来很多身份号码空的记录,这个问题的解决办法只能给cert_no定个范围或者等于多少,is not null居然不管用

原文地址:https://www.cnblogs.com/SouthRain/p/4239145.html