ROWID and ROWNUM are pseudo columns and attached to each row of a table.
ROWID : It gives the hexadecimal string representing the address of a row.It gives the location in database where row is physically stored.
It is 18 characters long, blockno,rownumber are the components of ROWID.
ROWNUM: It gives a sequence number in which rows are retrieved from the database.
The actual difference between ROWID and ROWNUM is that ROWID is a permanent unique identifier for that row.
However, the ROWNUM is temporary.
If you change your query, the ROWNUM number will refer to another row, the ROWID won't.
So the ROWNUM is a consecutive number which applicable for a specific SQL statement
What is the fastest way of accessing a row in a table ROWID or ROWNUM?
Using ROWID
ROWID : It gives the hexadecimal string representing the address of a row.It gives the location in database where row is physically stored.
It is 18 characters long, blockno,rownumber are the components of ROWID.
ROWNUM: It gives a sequence number in which rows are retrieved from the database.
The actual difference between ROWID and ROWNUM is that ROWID is a permanent unique identifier for that row.
However, the ROWNUM is temporary.
If you change your query, the ROWNUM number will refer to another row, the ROWID won't.
So the ROWNUM is a consecutive number which applicable for a specific SQL statement
What is the fastest way of accessing a row in a table ROWID or ROWNUM?
Using ROWID
No comments:
Post a Comment