查找重复的值
表Person
找出重复的email的值
思路1:两表查询,distinct去重
select distinct a.Email
from Person a,Person b
where a.id <>b.id and a.Email = b.Email
思路2:group by 分组,having 过滤,sum()函数计数>1
select Email
from Person
group by Email
having sum(Email)>1
本文来自博客园,作者:Widereye,转载请注明原文链接:https://www.cnblogs.com/YH-shjd-senvn/p/15827226.html