BINARY type

Represents byte sequence values.

Syntax

BINARY

Limits

The type supports byte sequences of any length greater or equal to 0.

Literals

X { 'num [ ... ]' | "num [ ... ]" }

num: Any hexadecimal number from 0 to F.

The prefix X is case sensitive.

If the hexadecimal string literal has an odd length the parser prepends a 0.

Examples

> SELECT X'1';
  [01]
> SELECT X'1ABF';
  [1A BF]
> SELECT X'';
  [ ]
> SELECT CAST('Spark' AS BINARY);
  [53 70 61 72 6B]