THE WORLD'S LARGEST WEB DEVELOPER SITE

SQL Server Concat With +

❮ SQL Server Functions

Example

Add 2 strings together:

SELECT 'W3Schools' + '.com';
Try it Yourself »

Definition and Usage

The + operator allows you to add two or more strings together.

Note: See also the CONCAT() and CONCAT_WS() functions.

Syntax

string1 + string2 + string_n

Parameter Values

Parameter Description
string1, string2, string_n Required. The strings to add together

Technical Details

Works in: SQL Server (starting with 2005), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse

More Examples

Example

Add 3 strings together:

SELECT 'SQL' + ' is' + ' fun!';
Try it Yourself »

Example

Add strings together (separate each string with a space character):

SELECT 'SQL' + ' ' + 'is' + ' ' + 'fun!';
Try it Yourself »

❮ SQL Server Functions