Ways of Joining string values in Sql Server

Rajesh_Kumar
Posted by Rajesh_Kumar under Sql Server category on | Points: 40 | Views : 510
3 ways to accomplish this:

-- Using + Sign
Select First_Name + ' ' + Middle_Name + ' ' + Last_Name as 'Employee Full Name' from Employees;


-- Using Concat in-build Function
Select Concat(First_Name,' ',Middle_Name, ' ',Last_Name) as 'Employee Full Name' From Employees; 

-- Using Space in-build function
Select First_Name + Space(1) + Middle_Name + Space(1) + Last_Name as 'Employee Full Name' from Employees;

Comments or Responses

Login to post response