当前位置:Gxlcms > 数据库问题 > SQL-Duplicate Emails

SQL-Duplicate Emails

时间:2021-07-01 10:21:17 帮助过:2人阅读

技术分享


 

思路:

两种思路,可以给当成两个表也可以给当成一张表来做

group by就是按照某个属性给表分个组


 

way 1:

select a.Email 
from Person as a,Person as b
where a.Id <> b.Id and a.Email = b.Email

way 2:

select Email
from Person
group by Email
having count(*) > 1

SQL-Duplicate Emails

标签:

人气教程排行