top of page
CerebroSQL

TO_BASE64

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Syntax:
TO_BASE64(str)

Converts the string argument to base-64 encoded form and returns the
result as a character string with the connection character set and
collation. 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. Base-64 encoded strings can be decoded using the FROM_BASE64()
function.

URL: https://dev.mysql.com/doc/refman/8.0/en/string-functions.html

Example

mysql> SELECT TO_BASE64('abc'), FROM_BASE64(TO_BASE64('abc'));
-> 'JWJj', 'abc'

bottom of page