How to concatenate two strings in Sql Server

Introduction:  In previous articles i explained How to delete all views from sql server database
and Take automatic backup of Sql server Database   and Copy all data from one table to another in the same database in Sql Server and Copy all data from one database table to another database table in Sql Server.

 Suppose we have a employee table having two columns First_Name having data "Lalit" and Last_Name having data "Raghuvanshi" and we want to display the the full name as "Lalit Raghuvanshi" in a single field then the query will be as:

SELECT  First_Name + ' ' + Last_Name  as Emp_Name FROM Employee

Now Emp_Name field will have the concatenated data "Lalit Raghuvanshi"


Previous
Next Post »

If you have any question about any post, Feel free to ask.You can simply drop a comment below post or contact via Contact Us form. Your feedback and suggestions will be highly appreciated. Also try to leave comments from your account not from the anonymous account so that i can respond to you easily..