SQLite 3 reference · String Functions

SQLite CONCAT() Function

Join any number of values into one string. Unlike ||, NULL arguments are skipped instead of making the result NULL.

SQLite 3 Since 3.44.0

Create a free account to save this page, take notes and track your progress. Sign in

Syntax

concat(X, ...)

Parameters

ParameterDescription
X, ... One or more values to join.

Return value

Text (never NULL).

Examples

Join valuesTry it yourself
SELECT concat('Order #', order_id, ' - ', status) AS label
FROM orders
LIMIT 3;

Output

label
Order #1 - delivered
Order #2 - delivered
Order #3 - delivered
NULL handling compared with ||Try it yourself
SELECT concat(name, ' / ', city) AS with_concat,
       name || ' / ' || city AS with_pipes
FROM customers
WHERE customer_id = 7;

Output

with_concat | with_pipes
Barbara Liskov /  | NULL

Version history

VersionChange
SQLite 3.44.0Added

In other languages

Was this page helpful?