TRY_BASE64_DECODE_BINARY
functionsupportedCore SQL functionsA special version of BASE64_DECODE_BINARY that returns a NULL value if an error occurs during decoding.
Syntax
supportedpartialnot supportednot scored
TRY_BASE64_DECODE_BINARY(<input> [, <alphabet>])
Parameters
| Name | Required | Description |
|---|---|---|
input | required | The base64-encoded string to convert to BINARY data type. |
alphabet | required | A string consisting of up to three ASCII characters: The first two characters in the string specify the last two characters (indexes 62 and 63) in the alphabet used to encode the input: A to Z (indexes 0-25). a to z (indexes 26-51). 0 to 9 (indexes 52-61). + and / (indexes 62, 63). Defaults: + and / The third character in the string specifies the character used for padding. Default: = |
Returns
This returns a BINARY value. The value can be inserted into a column of type BINARY, for example.
Usage notes
- For more information about base64 format, see base64.