Oracle - PL/SQL - CHARTOROWID Function

CHARTOROWID converts a value from CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to ROWID datatype. This function does not support CLOB data directly. However, CLOBs can be passed in as arguments through implicit data conversion.

The syntax for the chartorowid function is:

chartorowid( value1 )

value1 is the value to convert to a rowid.

The format of the rowid is:

BBBBBBB.RRRR.FFFFF

where:

BBBBBBB is the block in the database file;
RRRR is the row in the block;
FFFFF is the database file.

Applies To:

· Oracle 8i, Oracle 9i, Oracle 10g, Oracle 11g

For example:

select * from suppliers
where rowid = chartorowid('AAABoqAADAAAAwPAAA');

This would return a unique row from the suppliers table.