Function documentationCONCAT(x,y) Locate this document in the navigation structure

 

A concatenation (CONCAT(x,y), x||y or x&y) is a string function that returns the following results for the character string x (string specification of length n) and the character string y (string specification of length m):

Concatenation

x, y

Result of the Concatenation

CONCAT(x,y), x||y or x&y

x and y are concatenated to a character string with the length n+m.

If a character string originates from a column, its length is determined without taking trailing blanks into account (code attribute ASCII, UNICODE) or binary zeros (code attribute BYTE).

x or y is a NULL value

NULL value

Only expressions that produce an alphanumeric value are permitted as string specifications.

Columns with the same code attribute can be concatenated. Columns with different code attributes (ASCII and UNICODE) can be concatenated together and with date, time and time stamp values.

Example

SQL Tutorial, Functions, Changing character strings