Skip to main content

Categories: Conversion

STRING_BINARY

Returns a string that represents the provided bytes. Escapes non-printable characters as hex values.

Syntax

STRING_BINARY(bytes BYTES) → STRING

  • bytes: Bytes to convert to a string.

Examples

STRING_BINARY example
SELECT STRING_BINARY(BINARY_STRING('Dremio'))
-- Dremio
STRING_BINARY example
SELECT STRING_BINARY(FROM_HEX('54455354111213'))
-- TEST\x11\x12\x13