UNHEX
Warning
SingleStore 9.0 gives you the opportunity to preview, evaluate, and provide feedback on new and upcoming features prior to their general availability. In the interim, SingleStore 8.9 is recommended for production workloads, which can later be upgraded to SingleStore 9.0.
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