Oracle ROWNUM and ROWID difference

Опубликовано: 29 Май 2026
на канале: Anand Venkatesh
292
11

ROWNUM VS ROWID
What is the difference between ROWNUM and ROWID? Does Oracle make a distinction between a ROWID and ROWNUM?

Rownum = Generated Sequence Number of your output.
For each row returned by a query, the ROWNUM pseudo column returns a number indicating the order in which Oracle selects the row from a table or set of joined rows.
The first row selected has a ROWNUM of 1, the second has 2, and so on. So you can limit the number of rows in your result.

Rowid= Generated automatically at the time of insertion of row.
For each row in the database, the ROWID pseudo column returns the address of the row