标签:
delete from `jb_postcontent` where id not in(select min(id) from (select * from `jb_postcontent`) as t group by t.id);
网上搜索的大部分都是如下这样
delete from people where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1) and rowid not in (select min(rowid) from people group by peopleId having count(peopleId )>1)
结果你会发现,mysql报错,因为不能更新用于子查询里面的表。
标签:
原文地址:http://www.cnblogs.com/aleafo/p/5345603.html