前言:
此时兄弟们对“oracle合计去掉重复”都比较看重,大家都想要了解一些“oracle合计去掉重复”的相关资讯。那么小编也在网摘上收集了一些有关“oracle合计去掉重复””的相关内容,希望你们能喜欢,大家快快来了解一下吧!oracle查询删除重复记录
--删除
delete from upsr_dict_dtlwhere id in (select idfrom (select a.*,row_number() over (partition by dict_no,opt_code,opt_name order by opt_code) rnfrom upsr_dict_dtl awhere dict_no='PC1814') bwhere rn>=2)
--查询
select *from upsr_dict_dtlwhere id in (select idfrom (select a.*,row_number() over (partition by dict_no,opt_code,opt_name order by id desc) rnfrom upsr_dict_dtl awhere dict_no='DPAT_ID_TYPE_DG') bwhere rn>=2)
--删除
delete from upsrdp.table_duzhaozhao cwhere rowid not in(select min(rowid)--max(rowid)from upsrdp.table_duzhaozhao agroup by prdu_num)
--rowid删除记录
delete from upsrdp.TABLE_DUZHAOZHAOwhere rowid='AAAaGcAAHAAGyYjAAB'
2022-5-8
版权声明:
本站文章均来自互联网搜集,如有侵犯您的权益,请联系我们删除,谢谢。
标签: #oracle合计去掉重复