SQL语句查询数据库中重复记录的个数

2022-05-09 09:29:05

select a,b,c,count(*) from (select c.a,c.b,c.c from test c) hqwCBaQvaving count(*) >= 2 group by a,b,c

或者

select zdbh,tdzl,zdmj,count(*) from ecaadmin.zdsx group by zdbh,tdzl,zdmj having count(*) >= 2


相关文章 大家在看