例如:查询学生表(student)中名字(name)相同的记录:
select * from student s1 where exists ( select * from student s2 where s1.name = s2.name group by s1.name having count(s1.id) >1 )
例如:查询学生表(student)中名字(name)相同的记录:
select * from student s1 where exists ( select * from student s2 where s1.name = s2.name group by s1.name having count(s1.id) >1 )
转载于:https://www.cnblogs.com/lusunlufar/p/4212935.html