BASE32 encodes a BINARY value as a BASE32 string.
Syntax
STRING BASE32(BINARY <value>)
BINARY <value> → STRING
Parameters
value: Required. The BINARY value to encode.
Return value
Returns a STRING. Returns NULL if value is NULL.
Examples
Convert the string alibaba to BINARY, then encode it:
-- Returns MFWGSYTBMJQQ====.
SELECT BASE32(CAST('alibaba' AS BINARY));
Pass NULL as input:
-- Returns NULL.
SELECT BASE32(NULL);
See also
BASE32 is a string function. For the full list of string functions, see String functions.