Oracle ROWNUM Reserved Field

Use reserved field, ROWNUM in SELECT Statement to return record number in the data output:

SELECT ROWNUM, FIELD1, FIELD2, FIELD3 FROM YOUR_TABLE

Returns:

ROWNUM          FIELD1    FIELD2    FIELD3
1               F1VAL1    F2VAL1    F3VAL1
2               F1VAL2    F2VAL2    F3VAL2
3               F1VAL3    F2VAL3    F3VAL3
4               F1VAL4    F2VAL4    F3VAL4
5               F1VAL5    F2VAL5    F3VAL4

This free website was made using Yola.

No HTML skills required. Build your website in minutes.

Go to www.yola.com and sign up today!

Make a free website with Yola