In SQL Server, you can concatenate two or more strings by using the T-SQL CONCAT()
function. You can also use SQL Server’s string concatenation operator (+
) to do the same thing. Both are explained here.
In SQL Server (and in any computer programming environment), string concatenation is the operation of joining character strings end-to-end.
Here’s an example:
SELECT CONCAT('Peter', ' ', 'Griffin') AS 'Full Name';
Result:
Full Name ------------- Peter Griffin
Note that I actually concatenated 3 strings here. I concatenated the first name, the last name, plus a space.