oracle 批量插入时,如何去除重复数据
发布网友
发布时间:2022-04-24 19:28
我来回答
共1个回答
热心网友
时间:2022-04-08 19:21
先去重再导入。
删除表中多余的重复记录(多个字段),只留有rowid最小的记录
delete from 表 a
where (a.Id,a.seq) in
(select Id,seq from 表 group by Id,seq having count(*) > 1)
and rowid not in
(select min(rowid) from 表 group by Id,seq having count(*)>1)