HEX_DECODE()
Decode a hexadecimal string to binary
VARBINARY
or BLOB
HEX_DECODE (hex_data)
Parameter | Description |
---|---|
hex_data |
Hex encoded data |
HEX_DECODE
decodes a string with hex-encoded data, and returns the decoded value as VARBINARY
or BLOB
as appropriate for the input.If the length of the type of hex_data is not a multiple of 2, an error is raised at prepare time.If the length of the value of hex_data is not a multiple of 2, an error is raised at execution time.
When the input is not BLOB
, the length of the resulting type is calculated as type_length / 2
, where type_length is the maximum length in characters of the input type.