- Categories:
String & binary functions (Encoding/Decoding)
HEX_DECODE_STRING¶
Decodes a hex-encoded string to a string.
- See also:
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¶
The following decodes a sequence of hexadecimal digits into the corresponding word:
The hexadecimal digits A-F can be uppercase or lowercase. The following statement uses lowercase letters but produces the same result as the preceding statement:
This shows another example of using HEX_DECODE_STRING:
Create a table and data:
Now run a query to show that we can retrieve the data: