What is ROWID and ROWNUM in SQL?

What is ROWID and ROWNUM in SQL?

In this article i will try to explain ‘What is ROWID and ROWNUM in SQL?’. Pseudo columns are actually associated with the table data but it has nothing to do with table data.ROWID & ROWNUM are pseudo columns which are not actual columns in the table but behave like actual columns.You can select the values from pseudo columns like ROWID & ROWNUM.ROWID & ROWNUM are very important pseudo columns in oracle which is used in data retrieval.

ROWID ROWNUM
1.    ROWID is nothing but the physical memory location on where that data/row is stored. ROWID basically returns address of row.

2.    ROWID uniquely identifies row in database.

3.    ROWID is combination of knowledge object number,data block in datafile,position of row and datafile during which row resides.

4.    ROWID is 16 digit hexadecimal number whose datatype is additionally ROWID Or UROWID

5.    The fastest way to access a single row is ROWID

6.    ROWID is unique identifier of the ROW.

1.    ROWNUM is magical column in Oracle which assigns the sequence number to the rows retreives within the table.

2.    To limit the values within the table you’ll use rownum pseudocolumn

3.    ROWNUM is nothing but logical sequence number given to the rows fetched from the table.

4.    ROWNUM is logical number assigned temporarily to the physical location of a row.

5.    You can limit the values in the table using rownum

6.    ROWNUM is additionally unique temparary sequence number assigned thereto row.

 

Comments