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.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOcRXRn0iVb7rAn_lDKCbeI5June3NWhao-6du8rwE3mh6OVVgqHgqDVVx-xjbYIAU_AgxwpXncIS7eGt1RqeYzLi3ZgoMvyz3jJqaV0g-B_EZ54k4WUwoQPmbCpYoZFCkW3sxNXiEovI/s1600/concatenate.png)
Comments
Post a Comment