leetcode 196. Delete Duplicate Emails
# 慢,内连接
delete p1 from Person p1, Person p2 where p1.Email=p2.Email and p1.Id>p2.Id
delete from Person where Id not in ( select Id from ( select min(Id) as Id from Person group by Email) p);
【本文章出自博客园willaty,转载请注明作者出处,误差欢迎指出~】