Different between Difference ways of giving Alias name

Posted by Mahe under Sql Server on 6/13/2012 | Points: 10 | Views : 1843 | Status : [Member] | Replies : 4
Hi All,

In Database there are two ways to give Alias name-
by using "as" keyword and without using "as" keyword.
What is the difference between them?
Ex: Say,

1. Select emp_name as EmployeName, emp_dept as EmployeDepartment
From employtable

2. Select emp_name EmployeName, emp_dept EmployeDepartment
From employtable




Responses

Posted by: CGN007 on: 6/13/2012 [Member] Silver | Points: 25

Up
0
Down
I think no difference between them.AS is just optional.

Please refer here http://www.geeksengine.com/database/basic-select/column-alias.php

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

Posted by: Muhsinathk on: 6/13/2012 [Member] Bronze | Points: 25
Posted by: Muhsinathk on: 6/13/2012 [Member] Bronze | Points: 25
Posted by: Muhsinathk on: 9/5/2012 [Member] Bronze | Points: 25

Up
0
Down
There is no difference between both statements above. AS is just a more explicit way of mentioning the alias

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

Login to post response