Skip to main content
Converts a string into a Base64-encoded string. This function is an inverse of from_base64.

Syntax

Parameters

str: the string to encode. It must be of the VARCHAR type.

Return value

Returns a value of the VARCHAR type. If the input is NULL, NULL is returned. If the input is empty, an error is returned. This function accepts only one string. More than one input string causes an error.

Examples

Text