Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query
optimization, and usability that you won’t want to miss.
Converts a hexadecimal representation to the binary equivalent.
UNHEX(expression)
expression
A hexadecimal expression, in upper or lower case.
Binary data.
SELECT HEX('ohai');
+-------------+
| HEX('ohai') |
+-------------+
| 6F686169 |
+-------------+
SELECT UNHEX('6F686169');
+-------------------+
| UNHEX('6F686169') |
+-------------------+
| ohai |
+-------------------+