New SQL Server 2012 Function — CONCAT()Posted: March 23, 2012
When you work with string concatenation in SQL Server before SQL Server 2012, you need to explicitly handle NULL values and other datatype to string type in order to return a concatenated string. If you don’t replace NULL with an empty string, the result of the concatenation will be NULL.
Here comes a new function in SQL Server 2012: CONCAT(). It simplifies the concatenation operation.
The syntax is: CONCAT ( string_value1, string_value2 [, string_valueN ] )
You need to have minimum of two input values to use this fuinction. All input values inside the sunction are implicitly converted to string types first and then concatenated to return a string value. If there is any NULL value as input string, it will be converted as varchar(1) empty string implicitly.
You can read more from MSDN for this function: