delete from `user`
where id in( SELECT * from(select id from `user` WHERE id not in (select min(id) from `user` group by names having count(names)>1) ) tep)
红色为查询出重复数据的id作为要删除的数据条件
标签:log count HERE sql name color sel where min
delete from `user`
where id in( SELECT * from(select id from `user` WHERE id not in (select min(id) from `user` group by names having count(names)>1) ) tep)
红色为查询出重复数据的id作为要删除的数据条件
标签:log count HERE sql name color sel where min
原文地址:https://www.cnblogs.com/libiao-libar/p/9744700.html