您的位置:首页 > 数据库 > Oracle

oracle 重复数据去除

2018-02-05 13:19 281 查看
oracle 重复数据查重删除

select id
from (select row_number() over(partition by self_object_id order by self_object_id) record_line,
si.*
from sample_info si
where self_object_id in
(select self_object_id
from (select sample_info.self_object_id,
count(sample_info.self_object_id)
from sample_info
where sample_info.delete_flag = 0
and sample_info.sample_lab_no is null
group by sample_info.self_object_id
having count(sample_info.self_object_id) > 1)))
where record_line > 1
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: