|| [concatenation]
All functions > STRING > || [concatenation]
Concatenates two strings; chains associate to the left (same underlying CONCAT_FN bundle as variadic CONCAT).
Syntax
left || right · CONCAT(left, right, …)
Notes
a || b || cgroups as(a || b) || c- Same
NULLomission rules asCONCAT: useNULL(VARCHAR)where needed; omitted NULLs do not add separators (there are none) - For more than two pieces without nesting, prefer variadic
CONCAT(...)when it reads clearer
Related Functions
Examples
Operator ||
FeatureQL
SELECT
f1 := 'A' || 'B', -- Two operands
f2 := 'A' || 'B' || 'C' -- Left-associative chain
;Result
| f1 VARCHAR | f2 VARCHAR |
|---|---|
| AB | ABC |
Edge cases
FeatureQL
SELECT
f1 := 'Hello' || ' ' || 'World' -- Building a phrase
;Result
| f1 VARCHAR |
|---|
| Hello World |