|
Is there a best practice or any other compelling reason to use one of these techniques over the other?
The estimated execution plan looks identical for both so I'm not sure if there is any reason "As [LongName]" is any better or worse than "LongName ="
(comments are locked)
|
|
The simple answer is that the AS clause is the ISO standard. This is enough reason for me to use As rather than =. T-SQL is moving more towards ISO with each new version. The less code I have to rewrite later the better! Thanks
May 14 '10 at 09:20 AM
user-1783
(comments are locked)
|
|
or any other compelling reason... I tend to use brackets for column aliases and = for functions and expressions that tend to be longer such as: rn = ROW_NUMBER() OVER.... where it is more readily apparent what rn represents instead of having to look at the end of the statement for: AS [rn].
(comments are locked)
|

