eZeeNow.com

it's your's

String Concatenations using CONCAT() SQL Server

CONCAT is used for concatenating two or more string. It expects minimum of two arguments to concatenate as a string. You no need to do any casting when your using CONCAT SQL function. If there are any null values in the CONCAT first it will convert to empty string and then it will concatenates with the other arguments.
 

SELECT CONCAT( 'USING ', 'STRING CONCAT FUNCTION ', 2012,' SQL Version ', 11.0) AS Result;


CONCAT function having a limitation it will truncate on nvarchar >= 4000 and varchar >=8000

Loading