select * from 表名 a
where a.字段1 in
(select 字段1 from 表名 group by 字段1,字段2 having count(*)>1)
and a.字段2 in (select 字段2 from 表名 group by 字段1,字段2 having count(*)>1)
1.sql查询按两个字段查询重复记录代码如下(示例):select * from 表名 awhere a.字段1 in (select 字段1 from 表名 group by 字段1,字段2 having count(*) > 1) and a.字段2 in (select 字段2 from 表名 group by 字段1 ,字段2 having count(*) > 1)...