删除重复的电子邮箱

# Write your MySQL query statement below
delete from `Person`
where Id not in(
select * from (select min(Id) from `Person` group by Email
) as tmp);

//删除Person表中Email邮件字段重复值

//执行mysql后就会出现下面的的结果

[SQL] delete from `user`
where id not in(
select * from (select max(id) from `user` group by name
) as tmp);
受影响的行: 10
时间: 0.003s

posted @ 2019-06-27 10:38  谢其江  阅读(310)  评论(0编辑  收藏  举报