sql查询表中字段值相同的数据记录
查询A表中id的值相同的数据
select * from A a where exists (select id from A where id=a.id group by id having count(*)>1) ORDER BY id
查询A表中id的值相同的数据
select * from A a where exists (select id from A where id=a.id group by id having count(*)>1) ORDER BY id