How to use the SQL Server String Concat Function in SQL Server 2012

SQL Server String Concat Function

SQL Server 2012 includes a new Concat function that makes it easier to put strings, numbers, dates, and nulls together.

The old way was with ‘+’ signs and cast or convert.  Now you just use the SQL Server String Concat Function.

In this video I do a quick demonstration of the Concat Function.

Video: SQL Server String Concat

How to use the new SQL Server 2012 CONCAT Function to combine columns and strings.

I use the Chinook Sample Database and the following scripts:

select FirstName + ' ' + LastName + '-' + Company 
from customer

select CONCAT(FirstName,' ',LastName,'-',Company)
from customer

See the original  SQL Concat Function video.

Tags: , , ,

Facebook Comments:

Leave A Reply (No comments so far)

The comments are closed.

No comments yet