HEXTORAW function in Oracle

HEXTORAW is one of the vital Conversion functions of Oracle. It is used to convert a hexadecimal value to a raw value. The HEXTORAW function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.

Syntax:

HEXTORAW ( char )

Parameters:
char: It is used to specify the hexadecimal value to be converted.

Example 1:

HEXTORAW( '54B' )

Output:

'054B' 

Explanation:
The result is a raw value of the hexadecimal value passed.

Example 2:

HEXTORAW( '8B' )

Output:

'8B' 

Explanation:
The result is a raw value of the hexadecimal value passed.