CONCAT FUNCTION The CONCAT function is used to CONCAT two or more strings into a single string. The CONCAT function requires at least two input values, otherwise it will raise an error. If you specify a null value, the CONCAT function will convert the null value into a null string. The CONCAT function implicitly coverts all arguments to string types and then concatenate the inputs. Read more at http://msdn.microsoft.com/en-us/library/hh231515.aspx SELECT CONCAT ('Nazario','Santos') AS FULLNAME
As you can see in the picture, the strings are stuck together. To add a space, you can add a null value or you can use the quotes and the plus operator. SELECT CONCAT ('Nazario', +' GO
'+ 'Santos') AS FULLNAME
Alternatively you can use the null value and it will be converted into an empty string. SELECT CONCAT ('Nazario',NULL,'Santos') AS FULLNAME
Using the CONCAT function you can CONCAT two or more table columns into a single column SELECT CONCAT (FIRSTNAME, +' '+LASTNAME) AS Fullname FROM PEOPLE
As you can see in the picture below, we used the CONCAT function to concatenate the Firstname and Lastname column into a single column named fullname.
Learn more at http://www.pcfixtutorials.com