Skip to main content

Categories: Conversion, String, Binary

HEX

Returns the hexadecimal encoding of an expression.

Syntax

HEX(expression any primitive) → varchar

  • expression: The expression to encode.

Examples

HEX example
SELECT HEX('Dremio')
-- 4472656D696F
HEX example
SELECT HEX(2023)
-- 7E7