oracle数据库表中某几个字段的重复数据去重
程序员文章站
2022-06-02 13:03:03
...
delete from szpj_biz_水文观测数据 a
where (a.观测点_id, a.观测时间, a.取样位置) in
(select 观测点_id, 观测时间, 取样位置
from szpj_biz_水文观测数据
group by 观测点_id, 观测时间, 取样位置
having count(*) > 1)
and rowid not in (select min(rowid)
from szpj_biz_水文观测数据
group by 观测点_id, 观测时间, 取样位置
having count(*) > 1)
上一篇: 2021-05-03
下一篇: java面试常问问题总结---数据库篇