mysql 在查询结果中进行二次查询
第一次查询:查询身份证编号和出现次数
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
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。
- 上一篇: EL表达式格式化日期
- 下一篇: MySQL里实现类似SPLIT的分割字符串的函数