DB2 Version 9.7 for Linux, UNIX, and Windows

CLOB scalar function

Read syntax diagramSkip visual syntax diagram
>>-CLOB--(--character-string-expression--+------------+--)-----><
                                         '-,--integer-'      

The schema is SYSIBM.

The CLOB function returns a CLOB representation of a character string type. In a Unicode database, if a supplied argument is a graphic string, it is first converted to a character string data type before the function is executed.

character-string-expression
An expression that returns a value that is a character string. The expression cannot be a character string defined as FOR BIT DATA (SQLSTATE 42846).
integer
An integer value specifying the length attribute of the resulting CLOB data type. The value must be between 0 and 2 147 483 647. If a value for integer is not specified, the length of the result is the same as the length of the first argument.

The result of the function is a CLOB. If the argument can be null, the result can be null; if the argument is null, the result is the null value.