CONCAT() function in SQL Server Last Updated : 28 Dec, 2020 Comments Improve Suggest changes Like Article Like Report CONCAT() : This function in SQL Server helps to concatenate two or more strings together. CONCAT() function can accept a minimum of 2 parameters and a maximum of 254 parameters. Syntax : CONCAT(string_1, string_2, .......string_n) Parameters : string_1, string_2, .......string_n - The given strings which need to be concatenated. Returns : The function concatenates all the given string and returns them as one whole string. Applicable to the following versions : SQL Server 2017 SQL Server 2016 SQL Server 2014 SQL Server 2012 Example-1 : The general working of CONCAT() function. Concatenating 3 strings together with space in between - SELECT CONCAT('PYTHON', ' ', 'is', ' ', 'fun!!!') As Combined; Output : CombinedPYTHON is fun!!! Concatenating more than 3 strings together - SELECT CONCAT ('Every', 'next', 'level', 'of', 'your', 'life', 'demands', 'a', 'new', 'you!') As Combined; Output : CombinedEverynextlevelofyourlifedemandsanewyou! Example-2 : Using a variable with CONCAT() function, we assign the strings to variables and then concatenate them. DECLARE @Str1 AS VARCHAR(100)='Think' DECLARE @Str2 AS VARCHAR(100)='-' DECLARE @Str3 AS VARCHAR(100)='green' DECLARE @Str4 AS VARCHAR(100)=' ' DECLARE @Str5 AS VARCHAR(100)='Be' DECLARE @Str6 AS VARCHAR(100)='-' DECLARE @Str7 AS VARCHAR(100)='green' SELECT CONCAT(@Str1, @Str2, @Str3, @str4, @str5, @str6, @str7) AS Combined; Output : CombinedThink-green Be-green Example-3 : Concatenating numerical expression using CONCAT() function, here in place of string we combined numeric values. SELECT CONCAT(13, 03, 1999) AS Combined; Output : Combined1331999 Comment More infoAdvertise with us Next Article CONCAT() function in SQL Server V vanshgaur14866 Follow Improve Article Tags : Technical Scripter SQL Technical Scripter 2020 DBMS-SQL SQL-Server +1 More Similar Reads COUNT() Function in SQL Server The COUNT() function in SQL Server is a fundamental aggregate function used to determine the number of rows that match a specific condition. Counting rows provides valuable insights into data sets such as the total number of records, distinct values, or records meeting certain criteria.In this artic 3 min read ATN2() Function in SQL Server In this article, we are going to cover the ATN2()function in which we will see how we can get the arc tangent of two given numbers. Let's discuss one by one. // here val1 and val2 are input. Input : ATN2(val1, val2) Output : Arc tangent result. ATN2() : It is the function that returns the arc tangen 1 min read DAY() Function in SQL Server DAY() function : This function in SQL Server is used to return the day of the month i.e, from 1st to 31st for date stated. Features : This function is used to find the day of the month for a date specified. This function comes under Date Functions. This function accepts only one parameter i.e, date. 2 min read SQL Server FORMAT() Function SQL Server FORMAT() function formats the specified value in the given format. FORMAT Function in SQL ServerThe FORMAT function in SQL Server is used to format date/time and number values with locale-aware formatting. The FORMAT function achieves various formatting requirements, showing dates in spe 2 min read DATENAME() Function in SQL Server DATENAME() function : This function in SQL Server is used to find a given part of the specified date. Moreover, it returns the output value as a string. Features : This function is used to find a given part of the specified date.This function comes under Date Functions.This function accepts two para 2 min read Like