This Oracle tutorial explains how to use the Oracle/PLSQL RAWTOHEX function.
The Oracle/PLSQL RAWTOHEX function converts a raw value into a hexadecimal value. It is useful to move a varchar value to a blob field.
RAWTOHEX(x)
converts the binary number (RAW
) x to a VARCHAR2
string in equivalent hexadecimal number.
The syntax for the Oracle/PLSQL RAWTOHEX function is:
RAWTOHEX( raw )
raw
is the raw value to convert to a hexademical value.
SQL> select rawtohex('A') from dual;
RA
--
41
SQL>