Oracle 怎么样抽取、删除重复记录?
问题描述:
解决方案:
查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断
select * from people where peopleId in (select peopleId from people group by peopleId having count(peopleId) > 1)
如果要删除表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断,只留有rowid最小的记录
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)
特别注意:数据删除前请务必做好备份工作,避免误删的情况发生。
Oracle 怎么样抽取、删除重复记录?
问题描述:解决方案:查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断 select * from people where people...
点击下载文档
本文2024-09-22 20:21:48发表“eas cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-eas-113150.html
您需要登录后才可以发表评论, 登录登录 或者 注册
最新文档
热门文章