1.查询单列重复:
1 select * from test 2 where name in (select name from Y_ShipOrder group by name having count 3 (name) > 1)
2.查询多列重复
1 SELECT a.* FROM test a,( 2 SELECT name,code 3 FROM test 4 GROUP BY name,code 5 HAVING COUNT(1)>1 6 7 ) AS b 8 WHERE a.name=b.name AND a.code=b.code