查找重复的电子邮箱
sql 编程
1. 地址
https://leetcode-cn.com/problems/duplicate-emails/
2. 解法
内连接,或者多表查询
email 相同,但是 id 不同的行
select
distinct p1.Email
from
Person p1
inner join Person p2 on p1.Id <> p2.Id
and p1.Email = p2.Email
查找重复的电子邮箱
https://leetcode-cn.com/problems/duplicate-emails/
内连接,或者多表查询
email 相同,但是 id 不同的行
select
distinct p1.Email
from
Person p1
inner join Person p2 on p1.Id <> p2.Id
and p1.Email = p2.Email