Jump to content


Photo

To concatenate two fields in mysql


  • Please log in to reply
2 replies to this topic

#1 shan_cool

shan_cool
  • Members
  • PipPipPip
  • Advanced Member
  • 53 posts
  • LocationChennai,India

Posted 16 November 2005 - 11:23 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.

Thx in advance,
Shan

#2 sumitnice@rediffmail.com

sumitnice@rediffmail.com
  • Members
  • Pip
  • Newbie
  • 1 posts
  • LocationDelhi, INDIA

Posted 16 November 2005 - 11:33 AM

Do this

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


BEST OF LUCK


With Regards,
Sumit



Goals are the DREAMS with deadlines

#3 shan_cool

shan_cool
  • Members
  • PipPipPip
  • Advanced Member
  • 53 posts
  • LocationChennai,India

Posted 16 November 2005 - 11:44 AM

hi sumit,
thank u verymuch for ur reply.......

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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users