»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 11-02-2003, 11:24 PM   #1 (permalink)
Registered User
 
NoLimit's Avatar
 
Join Date: Apr 2001
Location: Northern California, USA
Posts: 55
NoLimit is on a distinguished road
MS Access: Inner Joins vs. Outer Joins

When is it appropriate to use either kind of joins? I thought I understood it, but I got some answers wrong on a quiz because I used the wrong type of join when writing the query.

NoLimit is offline   Reply With Quote
Old 11-02-2003, 11:46 PM   #2 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
Inner Join: When you want the fields from BOTH tables to match.

For instance in a classroom to student relationship. You'd only want students to appear when they ARE assigned to a classroom

On the other hand, an OUTER JOIN (Either LEFT or RIGHT) will show you ALL rows from ONE table, and ONLY the rows that match from the 2nd table.

So using the same example, you could desire a query that shows ALL students, but show classroom information about students who ARE assigned to a class

There is also a FULL OUTER JOIN but dont' think Access has those (access sucks lol )


That help or hurt?
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 11-03-2003, 03:07 PM   #3 (permalink)
Registered User
 
NoLimit's Avatar
 
Join Date: Apr 2001
Location: Northern California, USA
Posts: 55
NoLimit is on a distinguished road
Thanks for those examples. I sort of get it now.
NoLimit is offline   Reply With Quote
Old 11-03-2003, 06:29 PM   #4 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
If you're still unclear on something let us know
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 11-09-2003, 08:34 PM   #5 (permalink)
Registered User
 
NoLimit's Avatar
 
Join Date: Apr 2001
Location: Northern California, USA
Posts: 55
NoLimit is on a distinguished road
I think I get it now. When you join two tables using an outer join, the field you're joining from table a doesn't have to have a match or value in table b in order to be displayed. Whereas with an inner join, it will only display fields that equal whatever was mentioned in the inner join. Does that sound right?
NoLimit is offline   Reply With Quote
Old 11-09-2003, 10:25 PM   #6 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
Correct
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 07:04 AM.