2.select d.id,d.outer_code,row_number() over(partition by outer_code order by outer_code) row_flag from dict_depts_sour
1.select d.id,d.outer_code from dict_depts_source d order by outer_code(查看重复数据)
2.select d.id,d.outer_code,row_number() over(partition by outer_code order by outer_code) row_flag from dict_depts_source d(标识重复数据)
3.delete from dict_depts_source where id in(
select id from(select d.id,d.outer_code,row_number() over(partition by outer_code order by outer_code) row_flag from dict_depts_source d)t
where t.row_flag > 1)(删除重复数据)
4.select d.id,d.outer_code,row_number() over(partition by outer_code order by outer_code) row_flag from dict_depts_source d(检查删除效果)
, 本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉 本文系统来源:php中文网