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 2005 Forums
 Transact-SQL (2005)
 Table Join

Author  Topic 

pssumesh2003
Starting Member

35 Posts

Posted - 2009-10-02 : 03:27:20
hi

I am working with Sql server 2005 .
Is join possible with a table and a subquery having common fields?
if possible , please give me syntax & an example?

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2009-10-02 : 04:08:06
select t1.col, dt.col2
from table as t1
join
(
select col1,col2 from table2 where blabla...
) as dt
on t1.col = dt.col1


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -