Oracle删除重复数据的几种常用方法

1.有可区分的主键,其他数据相同

select * from 表名 dl where dl.id not in (select min(d.id) from  表名 d 
group by 重复列)

2.重复数据只能通过RowNum、RowId区分的数据

select * from 表名 where rowid in(
select max(rowid) from  表名 d
group by d.id,d.wareh_id,d.wareh_name having count(wareh_id)>1)

原文地址:https://www.cnblogs.com/tomfang/p/4337905.html