how to have column name without underscore [Resolved]

Posted by Oswaldlily under Sql Server on 10/10/2011 | Points: 10 | Views : 2347 | Status : [Member] | Replies : 4
Select id_number_1 as 'Employee details score' from tablename

Employee details score is column name.if i execute this ,it results in underscore...I need as it is without underscore




Responses

Posted by: Blessyjees on: 10/10/2011 [Member] Bronze | Points: 50

Up
0
Down

Resolved
Hi

I have tried this

select getDate() as 'todat date'

I got the result wothout underscore

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

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

Posted by: Gausi on: 10/10/2011 [Member] Starter | Points: 25

Up
0
Down
I have also tried thsi

Select zone_name as 'my zone name' From net_assets_zones


its give column name with out underscore

Regards,

Gaurav Singh
(gausi)

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

Posted by: Ndebata on: 10/10/2011 [Member] Starter | Points: 25

Up
0
Down
Try to use square bracket
Select id_number_1 as [Employee details score]  from tablename 


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

Posted by: Niladri.biswas on: 10/10/2011 [Member] Platinum | Points: 25

Up
0
Down
Select 1 AS 'Employee details score' 


Select 1 AS "Employee details score"

Select 1 AS [Employee details score]

Result
--------
Employee details score
1

Hope this helps

Best Regards,
Niladri Biswas

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

Login to post response