欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

oracle删除重复记录

程序员文章站 2022-06-02 16:07:01
...

转自:https://www.cnblogs.com/luohoufu/archive/2008/06/05/1214284.html

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)