All Products
Search
Document Center

MaxCompute:UNHEX

最終更新日:Jul 20, 2023

Converts a hexadecimal string into a string. This function is an additional function of MaxCompute V2.0.

Syntax

binary unhex(string <number>)

Parameters

number: required. A hexadecimal string.

Return value

A value of the BINARY type is returned. The return value varies based on the following rules:

  • If the value of number is 0, an error is returned.

  • If the value of number is null, null is returned.

Examples

-- The return value is abc. 
select unhex('616263');
-- The return value is abc. 
select unhex(616263);
-- The return value is null. 
select unhex(null);

Related functions

UNHEX is a mathematical function. For more information about functions related to data computing and conversion, see Mathematical functions.