UNHEX()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns a binary string based on one or more pairs of hexadecimal digits.
USAGE
UNHEX(string)
Argument Name | Description |
---|---|
| A string of hexadecimal digits |
DETAILS
UNHEX()
is a string function that returns a binary string by translating the pairs of hexadecimal digits in the argument.
Each pair of hexadecimal digits becomes a single byte in the resulting binary string.
A NULL
is returned if the argument is NULL
.
EXAMPLES
SELECT UNHEX('616263646566') AS result;
+--------+
| result |
+--------+
| abcdef |
+--------+