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 2000 Forums
 Transact-SQL (2000)
 INNER JOIN question

Author  Topic 

skiabox
Posting Yak Master

169 Posts

Posted - 2008-03-03 : 06:18:12
Is there any way you cannot get confused when using more than one inner join uppon more than two tables?
Thnx!

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-03-03 : 06:30:01
What is your confusion?

-- Table A joined to B and C
FROM
A INNER JOIN B ON A.KEY = B.KEY
JOIN C ON A.KEY = C.KEY

-- Table A joined to B and B joined to C
FROM
A INNER JOIN B ON A.KEY = B.KEY
JOIN C ON B.KEY = C.KEY

-- Table A join to B and Table C joined to B and A
FROM
A INNER JOIN B ON A.KEY = B.KEY
JOIN C ON B.KEY = C.KEY AND A.KEY = C.KEY


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

skiabox
Posting Yak Master

169 Posts

Posted - 2008-03-03 : 06:42:38
I see some people in their articles using Venn diagrams to explain joins.Do you believe that this is a correct way to explain joins?
Go to Top of Page
   

- Advertisement -