I am trying to understand joins and im a bit confused. I know how to join tables using
=
<=
IN exists and not exists
I was trying to try and understand the use of INNER JOIN, LEFT OUTER JOIN, USING etc but it is so confusing. The major problem i am having is that different people refer to them using different names. Is there a simple explanation of the different types of joins and what other names they are known as. For example, while googling i came across the following types
♦ Simple Join
♦ Equi join
♦ Natural Join
♦ Outer Join
♦ Self Join
♦ Cartesian join
♦ Inner join
♦ Nonequi join
♦ Theta join
♦ Self join
♦ Cross join
♦ Cross Joins
♦ Natural Joins
♦ Inner Join with USING Clause
♦ Inner Join with ON Clause
♦ Left Outer Join
♦ Right Outer Join
♦ Full OuterJoin
The majority of the above are duplicates, i.e. its the same type of join but with a different name. I am sure all the above can be recreated using one of (=, !=, not in, in exists etc) but I am struggling to undestand which is which and the difference between them. A diagram would probably help :)
Jeff Atwood to the rescue
http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With