📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

TO_BASE64



Converts the string argument to base-64 encoded form and returns the result as a character string. If the argument is not a string, it is converted to a string before conversion takes place. The result is NULL if the argument is NULL.

Syntax

TO_BASE64(<v>)

Arguments

ArgumentsDescription
<v>The value.

Return Type

VARCHAR

Examples

SELECT TO_BASE64('abc'); +------------------+ | TO_BASE64('abc') | +------------------+ | YWJj | +------------------+

Was this page helpful?