CONCAT scalar function
The CONCAT function combines two compatible string arguments.
The schema is SYSIBM.
The arguments must be compatible strings. For more information on compatibility, refer to the compatibility matrix in Table 1.
Either argument can also be a numeric data type. The numeric argument is implicitly cast to a VARCHAR data type.
The result of the function is a string that consists of the first string followed by the second string.
The result can be null; if any argument is null, the result is the null value.
The CONCAT function is identical to the CONCAT operator. For more information, see Concatenation operators in expressions.
Example: Using
sample table DSN8D10.EMP,
concatenate column FIRSTNME with column LASTNAME. Both columns are
defined as varying-length character strings.
SELECT CONCAT(FIRSTNME, LASTNAME)
FROM DSN8D10.EMP;