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

FROM_BASE64



Takes a string encoded with the base-64 encoded rules and returns the decoded result as a binary. The result is NULL if the argument is NULL or not a valid base-64 string.

Syntax

FROM_BASE64(<expr>)

Arguments

ArgumentsDescription
<expr>The string value.

Return Type

BINARY

Examples

SELECT TO_BASE64('abc'), FROM_BASE64(TO_BASE64('abc')) as b, b::String; ┌───────────────────────────────────────┐ │ to_base64('abc') │ b │ b::string │ │ String │ Binary │ String │ ├──────────────────┼────────┼───────────┤ │ YWJj │ 616263 │ abc │ └───────────────────────────────────────┘

Was this page helpful?