MySQL数据去重

删除掉某表重名用户

表名: user

字段:

主键 :id

用户名:name

delete from user where id not in(SELECT max(id) from user group by name);

posted @ 2019-09-29 20:39  night-bright  阅读(...)  评论(...编辑  收藏