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

SQL: GROUP BY And HAVING

Installing AdventureWorks Sample Databases from Microsoft

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