Skip to content

concat, ||

Concatenates two strings.

The || operator provides alternative syntax for CONCAT and can concatenate more than two strings.

concat( <expr> , <expr> )
<expr> || <expr> [ || <expr> ... ]

The input expressions must all be strings.

The data type of the returned value is string. If any input value is NULL, returns NULL.

SELECT concat('George Washington ', 'Carver');
+----------------------------------------+
| concat('George Washington ', 'Carver') |
+----------------------------------------+
| George Washington Carver |
+----------------------------------------+

Use the || concatenation operator instead of the function:

SELECT 'This ' || 'is ' || 'another ' || 'concatenation ' || 'technique.';
+--------------------------------------------------------------------+
| 'This ' || 'is ' || 'another ' || 'concatenation ' || 'technique.' |
+--------------------------------------------------------------------+
| This is another concatenation technique. |
+--------------------------------------------------------------------+
ScopeDB Logo ScopeDB
© 2025 ScopeDB. All rights reserved.