UNHEX
On this page
Converts a hexadecimal representation to the binary equivalent.
Syntax
UNHEX(expression)
Arguments
expression
A hexadecimal expression, in upper or lower case.
Return Type
Binary data.
Examples
SELECT HEX('ohai');
+-------------+
| HEX('ohai') |
+-------------+
| 6F686169 |
+-------------+
SELECT UNHEX('6F686169');
+-------------------+
| UNHEX('6F686169') |
+-------------------+
| ohai |
+-------------------+
Related Topics
Last modified: February 27, 2023