Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 select statement question

Author  Topic 

lz14
Starting Member

2 Posts

Posted - 2010-03-07 : 22:46:50
Hi guys
I've read a sql line like this:
select * from tableX test
What function does the "test" word perform ?
Thanks !

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-03-07 : 23:19:30
alias. Give the table "tableX" another name


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

lz14
Starting Member

2 Posts

Posted - 2010-03-08 : 01:25:47
whoops. The alias wasn't used it threw me off.
thanks for the help khtan
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-03-08 : 02:00:09
It is always better to use the keyword AS for alias
http://beyondrelational.com/blogs/madhivanan/archive/2008/09/09/should-alias-names-be-preceded-by-as-part-2.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -