196. Delete Duplicate Emails(SQL)

# Easy

# Write your MySQL query statement below
delete p1 
from Person p1, Person p2
where p1.Email = p2.Email and p1.Id > p2.Id;

为什么删掉p1表格里的东西,Person表格即p1而不是p2呢?

Last updated