What is the difference between rowid and rownum? How they works, Why we use rowid and rownum? Please tell me in detail with example.
Question asked by visitor Mitesh
What is the difference between rowid and rownum? How they works, Why we use rowid and rownum? Please tell me in detail with example.
Question asked by visitor Mitesh
Every row is identified by a rowid. ROWID is pseudo column in every table. The physical address of the rows is use to for the ROWID.IN HEXADECIMAL representation, ROWID is shown as 18 character string of the following format
BBBBBBBBB.RRRR.FFFF (block,row,file)
FFFF is the FileID of the datafile that contains the row.
BBBBBBBBB is the address of the datablock within the datafile that contains the row.
RRRR is the ROW NUMBER with the data block that contains the row.
ROWID is the fastest means of accessing data.
They are unique identifiers for the any row in a table.
They are internally used in the construction of indexes.
rowid is the unique index number of every row of table maintaining by database automatically.
rownum is the sequential number of rows in the resultset object.