Previous Topic Next topic Print topic


Concatenation

Restriction: This topic applies to Windows environments only.

The special symbol || (also called the concatenation operator) is used to attach string constants and data values appearing in query results. The output rows have the same length as the sum of the individual string constants and data values attached. If any component of the concatenation expression is null (such as a data value from a column), the entire expression is null. The following query uses the concatenation operator to displays last names, followed by a comma and space, and then first names.

SELECT lname||", "||fname
FROM employee
Previous Topic Next topic Print topic