Home Privacy Policy Feedback Link to us Site Map Forums

Oracle/PLSQL: CharToRowid Function


In Oracle/PLSQL, the chartorowid function converts a char, varchar2, nchar, or nvarchar2 to a rowid.

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.