mysql 删除表中 id不等于XXX的 并且XXX字段的重复记录

 delete from xxxxx where id in (select id from (Select * From xxxxx Where appid In (Select appid From xxxxx  Group By appid Having Count(*)>1)) as a where uid!=xxx) 

猜你喜欢

转载自blog.csdn.net/ljwy1234/article/details/81869257