Use the || string operator to concatenate two strings. The || operator converts operands of any datatype (except Binary) to String datatypes before concatenation:
Input value
Return value
'alpha' || 'betical'
alphabetical
'alpha' || 2
alpha2
'alpha' || NULL
alpha
The || operator includes leading and trailing spaces. Use the LTRIM and RTRIM functions to trim leading and trailing spaces before concatenating two strings.
Nulls
The || operator ignores null values. However, if both values are NULL, the || operator returns NULL.
Example of string operators
The following example shows an expression that concatenates employee first names and employee last names from two columns. This expression removes the spaces from the end of the first name and the beginning of the last name, concatenates a space to the end of each first name, then concatenates the last name: