Collections:
UNHEX() - HEX to String Conversion
How to convert a hexadecimal string to a byte sequence using the UNHEX() function?
✍: FYIcenter.com
UNHEX(in) is a MySQL built-in function that
converts a hexadecimal string to a byte sequence.
For example:
SELECT UNDEX('465949'), HEX('FYI');
-- +-----------------+------------+
-- | UNHEX('465949') | HEX('FYI') |
-- +-----------------+------------+
-- | FYI | 465949 |
-- +-----------------+------------+
Reference information of the UNDEX() function:
UNHEX(hex): bytes Interprets each pair of characters in the argument as a hexadecimal number and converts it to the byte represented by the number. The return value is a binary string. Arguments, return value and availability: hex: Required. The hexadecimal string to be converted. bytes: Return value. The converted byte sequence. Available since MySQL 5.7.
Related MySQL functions:
⇒ UPPER() - Convert String to Upper Case
⇐ UCASE() - Synonym for UPPER()
2023-11-13, 1118🔥, 0💬
Popular Posts:
Where Is the Export Dump File Located in Oracle? If you are not specifying the dump directory and fi...
How To Recover a Dropped Index in Oracle? If you have the recycle bin feature turned on, dropped ind...
How To Replace Given Values with NULL using NULLIF() in SQL Server Transact-SQL? Sometime you want t...
How to calculate the storage size of a JSON (JavaScript Object Notation) value using the JSON_STORAG...
What are binary literals supported in SQL Server Transact-SQL? Binary literals in Transact-SQL are s...