docs/en/sql-reference/sql-functions/string-functions/hex_decode_string.md
This function performs the opposite operation of hex().
It interprets each pair of hexadecimal digits in the input string as a number and converts it to the byte represented by the number. The return value is a binary string.
This function is supported from v3.0.
hex_decode_string(str);
str: the string to convert. The supported data type is VARCHAR. An empty string is returned if any of the following situations occur:
[0-9], [a-z], and [A-Z].Returns a value of the VARCHAR type.
mysql> select hex_decode_string(hex("Hello StarRocks"));
+-------------------------------------------+
| hex_decode_string(hex('Hello StarRocks')) |
+-------------------------------------------+
| Hello StarRocks |
+-------------------------------------------+
HEX_DECODE_STRING