1 select custcode, custname from bd_cubasdoc where custname in (select custname from bd_cubasdoc group by custname having count(*)>=2) 2 select custname from bd_cubasdoc group by custname having count(*)>=2 3 select custcode,custname from bd_cubasdoc group by custcode,custname having count(*)>=2
1,2可以查询到,3不可以。