CONCAT()

Documentation

VoltDB Home » Documentation » Using VoltDB

CONCAT()

CONCAT() — Concatenates two or more strings and returns the result.

Synopsis

CONCAT( string-expression { , ... } )

Description

The CONCAT() function concatenates two or more strings and returns the resulting string. The string concatenation operator || performs the same function as CONCAT().

Example

The following example concatenates the contents of two columns as part of a SELECT expression.

SELECT price, CONCAT(category,part_name) AS full_part_name
   FROM product_list ORDER BY price;

The next example does something similar but uses the || operator as a shorthand to concatenate three strings, two columns and a string constant, as part of a SELECT expression.

SELECT lastname || ', ' || firstname AS full_name
   FROM customers ORDER BY lastname, firstname;