题目来源:https://leetcode.com/problems/delete-duplicate-emails/
题目要求删除Email相同的Person,并且保留Id最小的那一个
那么我们直接用delete语句:
delete a from Person a join Person b
where a.Email = b.Email and a.Id > b.Id
通过
不知道为什么这题不如前面的难,反而通过率只有16.5%。。
题目来源:https://leetcode.com/problems/delete-duplicate-emails/
题目要求删除Email相同的Person,并且保留Id最小的那一个
那么我们直接用delete语句:
delete a from Person a join Person b
where a.Email = b.Email and a.Id > b.Id
通过
不知道为什么这题不如前面的难,反而通过率只有16.5%。。