how to change column title of table

Posted by Klbaiju under Sql Server on 3/13/2013 | Points: 10 | Views : 875 | Status : [Member] | Replies : 6
Hi,
my table employee contains id,firstname,lastname.
i want to display the table as id fullname
fname lname
sample data
id fullname
lname fname
100 ram kumar
200 karan kumar
means name field contains fullname and below fullname there is lname and fname
how it is possible

Regards
Baiju




Responses

Posted by: Murugavelmsc on: 3/13/2013 [Member] Starter | Points: 25

Up
0
Down
Hi

select id, concat(fname,' ', lname) as fullname from employee

Regards,
Murugavel S
murugavel.sadagopan@gmail.com
http://murugavelmsc.blogspot.in/

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikreddy on: 3/13/2013 [Member] Starter | Points: 25

Up
0
Down
You can directly change by right-click the Columns node under the Table and click on Rename then Refresh it


k@rth!k
karthikreddy08a50@gmail.com

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 3/13/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

try this Query

Select Id,(FirstName+' ' +LastName) as Name from Table_4

Mark as Answer if its helpful to you

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sahoomanoj27 on: 3/14/2013 [Member] Starter | Points: 25

Up
0
Down
Try this Query

SELECT ID, FNAME +' ' + LNAME AS [FULL NAME] , FNAME,LNAME FROM EMPLOYEE



REGARDS,
MANOJ SAHOO
GAIN KNOWLEDGE WHILE 1=1


Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 3/14/2013 [Member] Bronze | Points: 25

Up
0
Down
HI,
If you are in MS SQL you can use

SELECT ID, fname +' ' + lname AS FULL NAME FROM EMPLOYEE ;

If you are in MYSQL you can use
SELECT ID,CONCAT( fname ,' ' , lname) AS FULL NAME FROM EMPLOYEE ;


Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 3/14/2013 [Member] Bronze | Points: 25

Up
0
Down
Please mark as answer if it helpful to you..That helps others who search the same..

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response