|
-
May 3rd, 2005, 04:27 PM
#1
What is the difference between inner join and outer join?
I found that the resultant table after inner join and outer join from the same two joining tables could be the same. So what is the essential difference between inner join and outer join? Thanks for your inputs.
-
May 3rd, 2005, 09:30 PM
#2
Re: What is the difference between inner join and outer join?
 Originally Posted by dullboy
I found that the resultant table after inner join and outer join from the same two joining tables could be the same. So what is the essential difference between inner join and outer join? Thanks for your inputs.
INNER JOIN means that any data that is matched in the ON clause has to be matched btween both tables. So say one tabl has Bob, Jeb, and Fred and the other has Bill, Bob and Fred and you join on first name. INNER JOIN will find a mtch for only Bob and Fred in both tables thus Bill and Jeb will not be apart of the output.
OUTER JOIN depedning on RIGHT, LEFT or FULL will return all data from the reference tabled (LEFT being the first table named bfore the join predicate, RIGHT being the one right after and FULL being both). So a LEFT OUTER JOIN with the prvious conditions where Jeb is in the first table before the join predicate will result in the records for Bob, Jeb and Fred but not Bill.
Kinda late so I hope this makes sense.
-
May 4th, 2005, 11:59 AM
#3
Re: What is the difference between inner join and outer join?
Thanks for your explaination and examples.
 Originally Posted by antares686
INNER JOIN means that any data that is matched in the ON clause has to be matched btween both tables. So say one tabl has Bob, Jeb, and Fred and the other has Bill, Bob and Fred and you join on first name. INNER JOIN will find a mtch for only Bob and Fred in both tables thus Bill and Jeb will not be apart of the output.
OUTER JOIN depedning on RIGHT, LEFT or FULL will return all data from the reference tabled (LEFT being the first table named bfore the join predicate, RIGHT being the one right after and FULL being both). So a LEFT OUTER JOIN with the prvious conditions where Jeb is in the first table before the join predicate will result in the records for Bob, Jeb and Fred but not Bill.
Kinda late so I hope this makes sense.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|