Oracle的row_number() over函数消除重复的记录 (此种适用于通过条件排序后再删除,即对删除的记录有条件限制,而不仅是rowid最大或最小或重复的随意一条)
select row_number()over(partition by a order by b) as no,a,b from test; 标识重复数据
delete from test where b in (select b from (select row_number()over(partition by a order by b) as no,a,b from test) where no>1); 通过标识查出来删除