使用ROW_NUMBER 删除重复数据

假设表TAB中有a,b,c三列,可以使用下列语句删除a,b,c都相同的重复行。
delete from (select * from (select a,b,c,row_number() over(partition by a,b,c order by a,b,c) as row_num from tab) as e where row_num >1)

 

你可能感兴趣的:(ORACLE)