top of page
Shareware software
Topic
Syntax:
UNHEX(str)
For a string argument str, UNHEX(str) interprets each pair of
characters in the argument as a hexadecimal number and converts it to
the byte represented by the number. The return value is a binary
string.
URL: https://dev.mysql.com/doc/refman/8.0/en/string-functions.html
Example
mysql> SELECT UNHEX('4D7953514C');
-> 'MySQL'
mysql> SELECT X'4D7953514C';
-> 'MySQL'
mysql> SELECT UNHEX(HEX('string'));
-> 'string'
mysql> SELECT HEX(UNHEX('1267'));
-> '1267'
bottom of page