日期:2014-05-17 浏览次数:20804 次
with a as (select 1 id, 10 pri from dual union all select 1 id, 101 pri from dual union all select 2 id, 12 pri from dual union all select 2 id, 14 pri from dual union all select 2 id, 18 pri from dual )select row_number() over (partition by id order by pri) num, id, pri from a;