This Oracle tutorial explains how to use the Oracle/PLSQL CHARTOROWID function.
chartorowid
function converts a char, varchar2, nchar, or
nvarchar2
to a rowid
.
The format of CHARTOROWID
is:
CHARTOROWID(value1)
The format of the rowid is:
BBBBBBBRRRRFFFFF
where:
BBBBBBB
is the block in the database file;RRRR
is the row in the block;FFFFF
is the database file.
SQL> select chartorowid('AAABABAADAAAAAPAAA') from dual;
-- from w w w . j a v a 2 s . c om
CHARTOROWID('AAABA
------------------
AAABABAADAAAAAPAAA
SQL>
select * from emp where rowid = chartorowid('AAABABAADAAAAAPAAA');