HEXTORAW Function in Oracle SQL – PLSQL

The HEXTORAW function in Oracle SQL / PLSQL is used to convert hexadecimal values to raw values.

Syntax for the HEXTORAW function in Oracle SQL / PLSQL is:

SELECT HEXTORAW(hexa_decimal_value)
FROM table_name;

  • hexa_decimal_value is the hexadecimal value that is to be converted to raw value.

Example 1:

SELECT HEXTORAW('90A')
FROM DUAL;

Will return ‘090A’ as raw value.


Example 2:

SELECT HEXTORAW('00F')
FROM DUAL;

Will return ‘000F’ as raw value.


Tagged , , , , , , , , , , , . Bookmark the permalink.