- Categories:
String & binary functions (Encoding/Decoding)
HEX_DECODE_BINARY¶
Decodes a hex-encoded string to a binary.
- See also:
Syntax¶
Arguments¶
inputA string expression containing only hexadecimal digits. Typically, this input string is generated by calling the function HEX_ENCODE.
Returns¶
A BINARY value that can, for example, be inserted into a column of type
BINARY.
Examples¶
Start with a string; encode it as characters representing hexadecimal digits;
then convert those hex digit characters to BINARY using HEX_DECODE_BINARY:
Create and fill a table:
Now retrieve the BINARY value and display it as the original string (in the 3rd column of the output):
Decode a hex-encoded binary (output by MD5_BINARY):