Monday, January 25, 2016

The Database rowid and rownum pseudo columns

The Database rowid and rownum are the important pseudo columns that can be used and helpful in query writing.

Database rowid:
  • It is automatically generated unique id of a row and it is generated at a time of row inserts in a table 
  • It is a physical address of the rows.
  • A rowid is permanent
  • A rowid is 16-bit hexadecimal
  • A rowid gives address of rows or records
  • A rowid is the fastest means of accessing data.
Database rownum:
  • It is a sequential number assigned (by database) to each returned row during query execution.
  • It is temporary and numeric
  • It gives count of records
  • It is an dynamic value automatically retrieved along with select statement output.
  • It represents the sequential order in which Oracle has retrieved the row.
Thanks!

0 comments:

Post a Comment