select filed1,field2,count(*) from a
group by filed1,field2
having count(*) >1
比如表名:student
字段:学生、科目、成绩
select t.学生,t.科目,t.成绩
from
(select count(*) num,max(学生) 学生,max(科目) 科目,max(成绩) 成绩
from student stu
group by stu.学生,stu.科目,stu.成绩) t
where t.num > 1
select 字段,count(*) from 表 group by 字段 having count(*)>1
内连接 ,union,union All