ROWNUM
Purpose
ROWNUM is a pseudo column that is assigned an incremental unique integer value for records of a table or subselects, beginning with 1.
Usage Notes
Exasol implements ROWNUM adhering to the overall SQL semantics.
ROWNUMcannot be combined with other conditions in theWHEREclause. Anything you put into theWHEREclause of a statement filters input data. To avoid confusion and seemingly wrong results, we only allowROWNUMin situations where the result is in line with Oracle's semantic.ROWNUMcannot be used in combination with the PRIMARY KEY, UNIQUE, and FOREIGN KEY statements.
Example
SELECT SALES_ID, ROWNUM
FROM SALES
WHERE ROWNUM <10;
| SALES_ID | ROWNUM |
| 389577429 | 1 |
| 321740964 | 2 |
| 389577438 | 3 |
| 253762032 | 4 |
| 321740973 | 5 |
| 389577447 | 6 |
| 458941123 | 7 |
| 389577513 | 8 |
| 389577522 | 9 |