The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Databases
> Database Management
|
Differances between INNER JOIN and OUTER JOIN
Discuss Differances between INNER JOIN and OUTER JOIN in the Database Management forum on Dev Shed. Differances between INNER JOIN and OUTER JOIN Database Management forum discussing non-database specific SQL. Structured Query Language was designed to be a robust and standardized language for manipulating relational databases.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

August 2nd, 2011, 01:14 PM
|
|
Registered User
|
|
Join Date: Mar 2006
Posts: 44
Time spent in forums: 17 h 14 m 43 sec
Reputation Power: 0
|
|
|
Differances between INNER JOIN and OUTER JOIN
I was curious as to the situations when you would use INNER JOIN over OUTER JOIN and OUTER JOIN over INNER JOIN and what data LEFT JOIN would pull? I am currently using INNER JOIN to join 2 tables for relational reasons but cant really figure out OUTER JOIN so thought I should ask.
Thanks
|

August 2nd, 2011, 01:47 PM
|
 |
Still alive
|
|
Join Date: Mar 2007
Location: Washington, USA
|
|
|

August 2nd, 2011, 02:23 PM
|
 |
SQL Consultant
|
|
Join Date: Feb 2003
Location: Toronto Canada
|
|
|
Last edited by r937 : August 2nd, 2011 at 02:26 PM.
|

August 2nd, 2011, 04:47 PM
|
|
Registered User
|
|
Join Date: Mar 2006
Posts: 44
Time spent in forums: 17 h 14 m 43 sec
Reputation Power: 0
|
|
|
So the full outer join is saying everything that doesn't match from table a and table b as in your example?
|

August 2nd, 2011, 04:49 PM
|
|
Registered User
|
|
Join Date: Mar 2006
Posts: 44
Time spent in forums: 17 h 14 m 43 sec
Reputation Power: 0
|
|
|
oh, that would only be the case if we did a where clause for NULL?
|

August 2nd, 2011, 05:12 PM
|
 |
SQL Consultant
|
|
Join Date: Feb 2003
Location: Toronto Canada
|
|
Quote: | Originally Posted by reaper7861 oh, that would only be the case if we did a where clause for NULL? | yeah, sort of
see, the diagrams are also hard to grasp at first, aren't they
also, notice there is no diagram for cross join
|

August 2nd, 2011, 06:15 PM
|
|
Registered User
|
|
Join Date: Mar 2006
Posts: 44
Time spent in forums: 17 h 14 m 43 sec
Reputation Power: 0
|
|
|
Yes i noticed that and didn't even know that cross joining existed, I am curious as to what you would use that for?
|

August 2nd, 2011, 06:46 PM
|
 |
SQL Consultant
|
|
Join Date: Feb 2003
Location: Toronto Canada
|
|
|
you would use a cross join to generate all possible combinations of pairs of values
just remember that, and you will recognize the opportunity when it arises -- which isn't often, admittedly, but the cross join can be very useful
|

August 2nd, 2011, 06:54 PM
|
|
Registered User
|
|
Join Date: Mar 2006
Posts: 44
Time spent in forums: 17 h 14 m 43 sec
Reputation Power: 0
|
|
|
That is great information, thanks a lot.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|