BASE64_DECODE function [String]

Decodes data using the MIME base64 format and returns the string as a LONG VARCHAR.

Syntax
BASE64_DECODE( string-expression )
Parameters
  • string-expression   The string that is to be decoded. Note that the string must be base64-encoded.

See also
Standards and compatibility
  • SQL/2003   Vendor extension.

Example

The following inserts an image into an image table from an embedded SQL program. The input data (host variable) must be base64 encoded.

EXEC SQL INSERT INTO images ( image_data ) VALUES ( BASE64_DECODE ( :img ) );