参考链接https://blog.csdn.net/zsg88/article/details/78862852

 

第一次查询:查询身份证编号和出现次数

select cardid,count(cardid) as total from p_person_info group by cardid

在第一次查询结果进行二次查询:查询身份证出现次数大于1以上

select cardid from (select cardid,count(cardid) as total from p_person_info group by cardid) temp where temp.total>1

=====================================================

 

相关文章:

  • 2021-09-07
  • 2021-08-07
  • 2021-12-28
  • 2021-12-18
  • 2021-11-08
  • 2018-03-16
  • 2021-06-05
猜你喜欢
  • 2021-08-28
  • 2021-12-10
  • 2021-11-12
  • 2021-08-07
  • 2021-12-15
  • 2021-12-31
  • 2021-09-07
  • 2021-12-09
相关资源
相似解决方案