The difference between ROWNUM and ROWID is that ROWNUM is temporary while ROWID is permanent.
What is ROWID and ROWNUM in SQL?
Rowid and Rownum in SQL
What is ROWID?
ROWID is nothing but the physical memory location on which that data/row is stored.ROWID basically returns address of row.
ROWID uniquely identifies row in database.
ROWID is combination of data object number,data block in datafile,position of row and datafile in which row resides.
ROWID is 16 digit hexadecimal number whose datatype is also ROWID Or UROWID
The fastest way to access a single row is ROWID
ROWID is unique identifier of the ROW.
Example:- select rowid from dual;
AAAAECAABAAAAgiAAA
What is ROWNUM?
ROWNUM is magical column in Oracle which assigns the sequence number to the rows retreives in the table.
To limit the values in the table you can use rownum pseudocolumn
ROWNUM is nothing but logical sequence number given to the rows fetched from the table.
ROWNUM is logical number assigned temporarily to the physical location of the row.
You can limit the values in the table using rownum
ROWNUM is also unique temparary sequence number assigned to that row.
Example:
Select Rownum from dual;
Answer- 1
1. ROWNUM is nothing but the sequence which is allocated to that data retreival bunch.
2. ROWNUM is tempararily allocated sequence to the rows.
3.ROWNUM is numeric sequence number allocated to that row temporarily.
4.ROWNUM returns the sequence number to that row.
5. ROWNUM is an dynamic value automatically
retrieved along with select statement output.
6.ROWNUM is not related to access of data.
Oracle 12 c Features http://www.ebiztechnics.net/2015/09/oracle-sql-12c-features.html