unhex(str) - Converts hexadecimal argument to binary Performs the inverse operation of HEX(str). That is, it interprets each pair of hexadecimal digits in the argument as a number and converts it to the byte representation of the number. The resulting characters are returned as a binary string. Example: > SELECT DECODE(UNHEX('4D7953514C'), 'UTF-8') from src limit 1; 'MySQL' The characters in the argument string must be legal hexadecimal digits: '0' .. '9', 'A' .. 'F', 'a' .. 'f'. If UNHEX() encounters any nonhexadecimal digits in the argument, it returns NULL. Also, if there are an odd number of characters a leading 0 is appended.