Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 632 Bytes

File metadata and controls

24 lines (16 loc) · 632 Bytes
description
Converts the hexadecimal number into the bytes represented by a number.

UNHEX

Syntax

UNHEX(expression varchar) → varbinary

  • expression: A string containing only hexadecimal digits.

Examples

{% code title="UNHEX example" %}

SELECT UNHEX('4472656D696F')
-- RHJlbWlv

{% endcode %}

Usage Notes

The returned value is a binary string. If the expression contains non-hex characters the result is NULL.