CONCAT(...)
All functions > STRING > CONCAT(...)
Returns a single concatenated string from a list of strings.
Syntax
CONCAT(string, string, …) · CONCAT_FN(ARRAY[…])
Notes
- Variadic
CONCAT(a, b, …)is implemented the same way asCONCAT_FN(ARRAY[…]) - Every argument must be
VARCHAR: bareNULLis untyped and fails inference—useNULL(VARCHAR)orCOALESCE(expr, '') NULLentries in the bundled list are omitted—they are not treated as empty strings; literal''is kept and participates. UseCOALESCEwhen you need a visible empty segment- No separator between pieces; use
CONCAT_WSfor a delimiter - For binary
left || right(and left-associative chains), see Related operators (||)
Related Functions
Examples
CONCAT(...)
FeatureQL
SELECT
f1 := CONCAT('A', 'B', 'C'), -- Several pieces
f2 := CONCAT('Hello', ' ', 'World') -- Includes a space argument
;Result
| f1 VARCHAR | f2 VARCHAR |
|---|---|
| ABC | Hello World |
Edge cases
FeatureQL
SELECT
f1 := CONCAT('A', NULL(VARCHAR), 'B') -- NULL propagates
;Result
| f1 VARCHAR |
|---|
| NULL |