+ 1

what do mean by inner join and outer join

1st Oct 2016, 4:17 PM
Dhaval Patel
Dhaval Patel - avatar
2 Answers
+ 7
Great question. Joins are based on set theory (Google it). An inner join means you have 2 tables say A on the left and B on the right. The tables have to have something in common to link them like a user ID etc. An inner join says "return to me those items that are in BOTH table A and table B. An Outer join can be both a Left outer join or a right outer join, but the default (I think I'm recalling this correctly) is Left outer join so if you don't specify it's a Left outer join. In a Left outer join (the Left and Right referring to the first and second table as in the set picture we started with) the query is asking to return ALL of the items in table A (which is considered the table on the Left) AND also only those from table B that match the query condition with table A on the join, again like a user ID. Seriously though, Google or Wikipedia sets or joins. The internet is a great resource many times.
1st Oct 2016, 5:08 PM
DevCoder (John Sullivan)
DevCoder (John Sullivan) - avatar
+ 1
thanks bro
1st Oct 2016, 5:09 PM
Dhaval Patel
Dhaval Patel - avatar