输入banner图图片脚本导航/分类

[LeetCode][SQL]Delete Duplicate Emails

link table A.Email = B.Email first !!!! delete A from Person A, Person B where A.Email = B.Email and A.Id > B.Id

 

delete语句里不能再select这个表,这种写法是过不了的。

delete A from Person A where A.Email in (select B.Email from Person B group by B.Email having count(*) > 1)

 

[LeetCode][SQL]Delete Duplicate Emails

标签: