SQL: Concatenating Columns











Concatenation means combining the value of two or more columns together to form a single value. The most common usage for this operation is to combine the first name and last name field. Like the query below.

  SELECT FirstName + ' ' + LastName AS Name
FROM Employees

The query above concatenates the FirstName and LastName column from the Employees table in the



Northwind database and assign the alias Name to combined value.


Comments

Popular posts from this blog

Installing AdventureWorks Sample Databases from Microsoft

SQL: GROUP BY And HAVING

ASP.NET : Create an Empty Web Application Project in Visual Studio 2012