Oracle ROWNUM BETWEEN

If you have ever used the ROWNUM pseudocolumn, you will have an idea what the ROW_NUMBER analytic function does. The Oracle / PLSQL ROWNUM function returns a number that represents the order that a row is selected by Oracle from a table or joined tables.

It is used to assign a unique number from 1-N to the rows within a partition. This Oracle tutorial explains how to use the Oracle / PLSQL ROWNUM function with syntax and examples.

At first glance this may seem similar to the RANK and DENSE_RANK analytic functions, but the ROW_NUMBER function ignores ties and always gives a unique number to each row.