Concatenation function

<< Click to Display Table of Contents >>

Navigation:  Local SQL > Data Manipulation Language > Functions >

Concatenation function

Previous pageReturn to chapter overviewNext page
hmtoggle_plus1See also

Concatenates two character values.

value1 || value2

Description

Use the concatenation function to concatenate two character values (column, literal, parameter, or caculated values) into a single string.

The expression below returns the string "ABCdef".

"ABC" || "def"

The statement below uses the concatenation function to combine column values with a character literal.

SELECT LastName || ", " || FirstName

FROM Names

Applicability

The concatenation function can only be used with character columns or literals. To use on values of other data types, the values must first be converted to CHAR using the CAST function.

Note: the concatenation function cannot be used with memo or BLOB columns.