FROM_BASE64
Descriptionβ
Returns the result of Base64 decoding the input string. Special cases:
- When the input string is incorrect (a string that is not possible after Base64 encoding appears), NULL will be returned
Syntaxβ
FROM_BASE64 ( <str> )
Parametersβ
Parameters | Description |
---|---|
<str> | The string to be Base64 decoded |
Return valueβ
Parameter
- When the input string is incorrect (a string that is not possible after Base64 encoding appears), NULL will be returned.
Exampleβ
SELECT FROM_BASE64('MQ=='),FROM_BASE64('MjM0'),FROM_BASE64(NULL)
+---------------------+---------------------+-------------------+
| from_base64('MQ==') | from_base64('MjM0') | from_base64(NULL) |
+---------------------+---------------------+-------------------+
| 1 | 234 | NULL |
+---------------------+---------------------+-------------------+