How to Concat 2 Column values in MySQL?

 Posted by vishalneeraj-24503 on 11/26/2013 | Category: Sql Server Interview questions | Views: 2305 | Points: 40

With the help of CONCAT in-built mysql function,we can add 2 column values to make one value as shown:-

select Concat(employee_firstname,' ',employee_lastname) as 'Employee Full Name' from employee_master where status = 'AA';

We can Concat more columns as many as we can,

select Concat(Concat(employee_firstname,' ',employee_lastname),' ',employee_code) as 'Employee Name' from employee_master where status = 'AA';

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response