TO_BINARY
functionsupportedCore SQL functionsConverts the input expression to a binary value. For NULL input, the output is NULL. See also: - TRY_TO_BINARY. - Binary input and output.
Syntax
supportedpartialnot supportednot scored
TO_BINARY( <string_expr> [, '<format>'] )
TO_BINARY( <variant_expr> )
Parameters
| Name | Required | Description |
|---|---|---|
string_expr | required | A string expression. |
format | optional | The binary format for conversion: HEX, BASE64, or UTF-8 (see Binary input and output). The default is the value of the BINARY_INPUT_FORMAT session parameter. If this parameter is not set, the default is HEX. |
Returns
Returns a value of type BINARY.