Subject | Question on JOINS |
---|---|
Author | Paul R. Gardner |
Post date | 2006-01-23T21:20:56Z |
Let's say I have the following select statement:
Select a.Field1, b.Field2
From A
Join B on A.KeyField1 = B.KeyField2
Instead of JOIN, what is the difference between the following:
1. Left Join
2. Right Join
3. Left Outer Join
4. Right Outer Join
5. Left Inner Join
6. Right Inner Join
7. Join <-- Just plain old JOIN is valid as well, right?
OR
8. A different approach:
Select a.Field1, b.Field2
From A, B
Where A.KeyField1 = B.KeyField2
Which is better 1 - 8? Why?
I've always used #1 only, and I'm wondering if this is wrong and if so,
for what scenarios.
Thanks in advance.
Paul
[Non-text portions of this message have been removed]
Select a.Field1, b.Field2
From A
Join B on A.KeyField1 = B.KeyField2
Instead of JOIN, what is the difference between the following:
1. Left Join
2. Right Join
3. Left Outer Join
4. Right Outer Join
5. Left Inner Join
6. Right Inner Join
7. Join <-- Just plain old JOIN is valid as well, right?
OR
8. A different approach:
Select a.Field1, b.Field2
From A, B
Where A.KeyField1 = B.KeyField2
Which is better 1 - 8? Why?
I've always used #1 only, and I'm wondering if this is wrong and if so,
for what scenarios.
Thanks in advance.
Paul
[Non-text portions of this message have been removed]