BASE64ENCODE and BASE64DECODE
The BASE64ENCODE and BASE64DECODE helper REST functions complete Base64 encoding or decoding of the provided text.
Tip:
The sample HTTP user-defined functions are intended
to be used within Db2 SQL applications to
access remote non-Db2 REST-based services
through SQL statements. Do not confuse them with Db2 native REST services, which supports using a
REST-based interface to interact with Db2
data from web, mobile, and cloud applications.
The sample HTTP user-defined functions are intended
to be used within Db2 SQL applications to
access remote non-Db2 REST-based services
through SQL statements. Do not confuse them with Db2 native REST services, which supports using a
REST-based interface to interact with Db2
data from web, mobile, and cloud applications.
The schema is DB2XML.
- text
- Specifies the text to encode or decode. For BASE64ENCODE, this argument is provided as a VARCHAR(2732) value and the function returns a Base64-encoded string. For BASE64DECODE, this argument is provided as a Base64-encoded VARCHAR(4096) value and the function returns the data as binary.

