sql server select column
What is the difference between
1).
SELECT
开发者_如何学Ce.name 'name',
e.age 'age'
FROM
Employee e
2).
SELECT
e.name name,
e.age age
FROM
Employee e
In the first you are qualifying the column aliases as strings, in the second you are not.
Functionally, they are the same.
They would product the same result as:
SELECT
e.name,
e.age
FROM
Employee e
e.g. if you like to use column names with space, special characters or reserved SQL words you need qualifying. Otherwise the quotes are optional.
SELECT
e.name 'first name'
...
精彩评论