|| (string concatenation)
On this page
Concatenates strings with the || operator.
Syntax
<left> || <right> [|| <next> ...]Arguments
| Argument | Type | Description |
|---|---|---|
<left> | string | First string. |
<right> | string | String to append. |
<next> | string | Optional additional strings. |
Returns
Returns string. Returns NULL if any input is NULL.
Examples
Combine the service and event name into a label for a report or investigation.
VALUES ('checkout', 'payment_failed'), ('catalog', 'item_viewed')
SELECT $0 AS service, $1 AS event
SELECT service || ': ' || event AS label+--------------------------+
| label |
+--------------------------+
| checkout: payment_failed |
| catalog: item_viewed |
+--------------------------+