- Categories:
String & binary functions (Encoding/Decoding)
TRY_HEX_DECODE_STRING¶
A special version of HEX_DECODE_STRING that returns a NULL value if an error occurs during decoding.
Syntax¶
Arguments¶
inputA hex-encoded string expression. Typically the input was created by a call to HEX_ENCODE.
Returns¶
The returned value is a string (VARCHAR).
Examples¶
This shows how to use the function:
Create a table and data:
Now run the query:
Output: