CONCAT() function in SQL

Last Updated : 9 Sep, 2026

The CONCAT() function in SQL is used to combine two or more strings or values into a single string. It can also be used to combine values from multiple columns.

Syntax:

CONCAT(string1, string2, ...)

Example

Consider the following employee table:

11

Query:

SELECT CONCAT(first_name, ' ', last_name) AS full_name
FROM employee;

Output:

12
  • Here, CONCAT() combines the first_name, a space and last_name into a single full_name value.

CONCAT() with NULL Values

CONCAT() treats NULL values as empty strings in SQL Server.

Query:

SELECT CONCAT(first_name, ' ', last_name) AS full_name
FROM employee;

Output:

13

If last_name is NULL, the result will contain only the first_name and the space.

Comment