The FROM_BASE64_BINARY function decodes a Base64-encoded string and returns the result as a VARBINARY value.
Special cases:
FROM_BASE64_BINARY ( <str> )
| Parameter | Description |
|---|---|
<str> | The Base64-encoded string to be decoded. |
The parameter <str> decoded from Base64, returned as a VARBINARY result.
Special cases:
SELECT FROM_BASE64_BINARY('MQ==');
+--------------------------------------------------------+ | FROM_BASE64_BINARY('MQ==') | +--------------------------------------------------------+ | 0x31 | +--------------------------------------------------------+
SELECT FROM_BASE64_BINARY('MjM0');
+--------------------------------------------------------+ | FROM_BASE64_BINARY('MjM0') | +--------------------------------------------------------+ | 0x323334 | +--------------------------------------------------------+
SELECT FROM_BASE64_BINARY(NULL);
+----------------------------------------------------+ | FROM_BASE64_BINARY(NULL) | +----------------------------------------------------+ | NULL | +----------------------------------------------------+