Rownum is a pseudo-column that Oracle populates once the data has been retrieved. The numbers are consecutive and as far as I can tell there is no what to alter the rownum assignment.
Originally posted by Heath Wouldn't the ROW_NUMBER analytic function in an inline view do the trick?
That works too...
Code:
1 select x, row_number() over (partition by x order by x) as mov_rank
2* from xyz
SQL> /
X MOV_RANK
---------- ----------
10 1
10 2
10 3
20 1
30 1
40 1
40 2
7 rows selected.
Bookmarks