Extended rowids use a base 64 encoding of the physical address for each row selected. The encoding
characters are A-Z, a-z, 0-9, +, and /. For example, the following query:
SELECT ROWID, last_name FROM employees WHERE department_id = 20;
can return the following row information:
ROWID LAST_NAME
------------------ ----------
AAAAaoAATAAABrXAAA BORTINS
AAAAaoAATAAABrXAAE RUGGLES
AAAAaoAATAAABrXAAG CHEN
AAAAaoAATAAABrXAAN BLUMBERG
An extended rowid has a four-piece format, OOOOOOFFFBBBBBBRRR:
OOOOOO: The data object number that identifies the database segment (AAAAao in the example). Schema
objects in the same segment, such as a cluster of tables, have the same data object number.
FFF: The tablespace-relative datafile number of the datafile that contains the row (file AAT in the
example).
BBBBBB: The data block that contains the row (block AAABrX in the example). Block numbers are
relative to their datafile, not tablespace. Therefore, two rows with identical block numbers could
reside in two different datafiles of the same tablespace.
RRR: The row in the block.
You can retrieve the data object number from data dictionary views USER_OBJECTS, DBA_OBJECTS, and
ALL_OBJECTS. For example, the following query returns the data object number for the employees table
in the SCOTT schema:
SELECT DATA_OBJECT_ID FROM DBA_OBJECTS
WHERE OWNER = 'SCOTT' AND OBJECT_NAME = 'EMPLOYEES';
You can also use the DBMS_ROWID package to extract information from an extended rowid or to convert
a rowid from extended format to restricted format (or vice versa).