TO_BASE64()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns a base-64 encoded representation of a string.
USAGE
TO_BASE64(string)
Argument Name | Description |
---|---|
| The string that is to be encoded |
DETAILS
TO_BASE64()
is a string function that returns a base-64 encoded string of the input string.
A NULL
is returned if the argument is NULL
.
For the opposite conversion, see FROM_
EXAMPLES
SELECT TO_BASE64('123');
+------------------+
| TO_BASE64('123') |
+------------------+
| MTIz |
+------------------+
SELECT FROM_BASE64(TO_BASE64('mariadb'));
+-----------------------------------+
| FROM_BASE64(TO_BASE64('mariadb')) |
+-----------------------------------+
| mariadb |
+-----------------------------------+