String Operators

  • reference
January 19, 2025
+ 12

SQL++ provides the concatenation string operator.

Concatenation

The concatenation operator joins two strings. The result of the concatenation operator is also a string.

Syntax

concatenation-term ::= expr '||' expr
Syntax diagram

Example

The following example shows concatenation of two strings.

Query
sql++
SELECT fname || " " || lname AS full_name FROM tutorial
Result
json
{ "results": [ { "full_name": "Dave Smith" }, { "full_name": "Earl Johnson" }, { "full_name": "Fred Jackson" }, { "full_name": "Harry Jackson" }, { "full_name": "Ian Taylor" }, { "full_name": "Jane Edwards" } ] }

Refer to Comparison Operators for string comparisons.