RAWTOHEX
RAWTOHEX(raw_value RAW) RETURN VARCHAR2;
Section titled “RAWTOHEX(raw_value RAW) RETURN VARCHAR2;”- raw_value raw: This parameter is the raw binary data that needs to be converted into hexadecimal characters. RAW data type in Oracle is used to store binary data or byte string, and the raw_value is that binary value that is to be transformed into the hexadecimal equivalent.
Example
Section titled “Example”SELECT RAWTOHEX('123') FROM dual;Output
Section titled “Output”'313233'Explanation
Section titled “Explanation”RAWTOHEX is a conversion function in Oracle that is used to convert raw data into hexadecimal format. In this example, each character of the raw input ‘123’ is transformed into its corresponding hexadecimal representation. ‘1’ becomes ‘31’, ‘2’ becomes ‘32’, and ‘3’ becomes ‘33’. The result is the concatenated hexadecimal string ‘313233’.