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
 General SQL Server Forums
 New to SQL Server Programming
 inside FROM contain SELECT

Author  Topic 

chxxangie
Starting Member

16 Posts

Posted - 2010-04-14 : 10:46:18
select a, b, c
from tblA, tblB, (select a.* from tblA a)
where ...

i would like to know what is the SELECT (inside the FROM) mean for this sql? Thx

Transact Charlie
Master Smack Fu Yak Hacker

3451 Posts

Posted - 2010-04-14 : 11:10:28
It's called a derived table. They are very useful.

Here's a decent link for a starter:
http://www.sql-server-performance.com/articles/per/derived_temp_tables_p1.aspx

Also -- you will want to read up on JOIN syntax.


Charlie
===============================================================
Msg 3903, Level 16, State 1, Line 1736
The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION
Go to Top of Page

chxxangie
Starting Member

16 Posts

Posted - 2010-04-16 : 05:44:49
Hi Charlie, thanks for your reply. i'd learnt a lot from the link.... thank you very much! :D
Go to Top of Page
   

- Advertisement -