Usage of alias in query editor - by Prasant Nanda

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 785006 Comments
Status Closed Workarounds
Type Suggestion Repros 0
Opened 4/18/2013 6:22:09 AM
Access Restriction Public

Description

Before sql 2012, the alias was preceeded with a space for an object i.e. objectname alias. But in 2012 even there is no space it works.

select * from [schmaname].[tablename]test -- it will give result without error. Below query also works without error.

select * from [schmaname].[tablename]
sdfsf
Sign in to post a comment.
Posted by Umachandar [MSFT] on 4/19/2013 at 11:27 AM
Hello Prasant,
The syntax you posted is valid syntax since the keyword AS is optional for column or table aliases. Please use the optional keyword if you don't want ambiguities.

--
Umachandar, SQL Programmability Team