Author Topic: To concatenate two fields in mysql  (Read 1219 times)

0 Members and 1 Guest are viewing this topic.

Offline shan_coolTopic starter

  • Enthusiast
  • Posts: 183
    • View Profile
    • http://
To concatenate two fields in mysql
« on: November 16, 2005, 06:23:45 AM »
Hi all,
          I hav two fields namely,Emp_Fname and Emp_Lname.... in mysql. i would like to concatenate while displaying them

Select Emp_Fname||Emp_Lname as Employee_Name from ......

but its not working. tell me how to concatenate and make them a single field to display.

thanks in advance,
Shan

Offline sumitnice@rediffmail.com

  • Irregular
  • Posts: 45
    • View Profile
    • http://
To concatenate two fields in mysql
« Reply #1 on: November 16, 2005, 06:33:15 AM »
Do this

SELECT CONCAT(Emp_Fname, " ", Emp_Lname)
from [table name]


BEST OF LUCK


With Regards,
Sumit


Goals are the DREAMS with deadlines

Offline shan_coolTopic starter

  • Enthusiast
  • Posts: 183
    • View Profile
    • http://
To concatenate two fields in mysql
« Reply #2 on: November 16, 2005, 06:44:26 AM »
hi sumit,
        thank u verymuch for ur reply.......

do keep in touch...
bye for now
shan..