题意:删除Email重复的行,保留Id最小的行,也就使每个Email只保留Id最小那个
思路:用删除语句进行删除
题目链接:https://leetcode.com/problems/delete-duplicate-emails/
delete p1
from Person as p1, Person as p2
where p1.Id > p2.Id and p1.Email = p2.Email
题意:删除Email重复的行,保留Id最小的行,也就使每个Email只保留Id最小那个
思路:用删除语句进行删除
题目链接:https://leetcode.com/problems/delete-duplicate-emails/
delete p1
from Person as p1, Person as p2
where p1.Id > p2.Id and p1.Email = p2.Email