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作为要删除的数据条件
原文地址:https://www.cnblogs.com/libiao-libar/p/9744700.html
时间: 2024-09-30 22:15:53