A concatenation (concatenation) x||y or x&y is a string function that supplies the following results for x (character string with the length n) and y (character string with the length m):
|
Result of the Concatenation |
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 the NULL value |
Columns with the same code attribute can be concatenated.
Columns with different code attributes (ASCII and UNICODE) can be concatenated together as well as with date values, time values, and timestamp values.
Example table: customer
SELECT name, zip & ' – ' & city address FROM customer
WHERE city = 'New York'
NAME |
ADDRESS |
Porter |
80335 – New York |
Porter |
70596 – New York |
Howe |
81737 – New York |
Griffith |
81739 – New York |