TSQL JOIN Types Poster (Version 3)

Download PDF

NOTE:: There is an updated version of the poster available now.   Version 4 is now available.

So many times I have been asked for help with a query, where the question really comes down to the understanding of the difference between INNER and LEFT or RIGHT JOINs. I created this poster a few years ago and I keep it posted on the wall at the office. This way when I am trying to explain JOIN types, I just refer to the poster.

I have created the poster below to help describe JOIN types in SQL Server. This had lead to lots of confusion over time, and this is the best way that I have seen to describe them.

If you are looking for the MySQL version of the poster, click here.

Click to Download TsqlJoinTypes.pdf
TsqlJoinTypes
Click to Download TsqlJoinTypes.pdf
The diagram shows the following: INNER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, SEMI JOIN, ANTI SEMI JOIN, LEFT OUTER JOIN with exclusion, RIGHT OUTER JOIN with exclusion, FULL OUTER JOIN, CROSS JOIN, FULL OUTER JOIN with exclusion, CROSS APPLY, OUTER APPLY, two INNER JOINs, two FULL OUTER JOINs, INNER JOIN and a LEFT OUTER JOIN and two LEFT OUTER JOINs.

If you are interested in printing out the poster, download the TsqlJoinTypes.pdf file and print it.

 

See Also:

Tagged with: , , , ,
7 comments on “TSQL JOIN Types Poster (Version 3)
  1. Cory says:

    Very good as a quick reference for beginners.
    The right-most Venn for Semi Join needs to say “Table2”.
    Maybe a Union and Union All would be interesting to see.

  2. William says:

    The venn diagram for “two inner joins” has a typo, I think. One of the “Table1″s should be a “Table2”.

  3. Arthur says:

    Nice document. I can show this to my app developers to teach them. But maybe it should contain a warning that a cross join is not the same as a full outer join, although it looks that way based on the image.

  4. Kevin Kline says:

    Great chart, Steve. I love it! Not to put more work on you, but would you consider adding the set operators like EXCEPT / MINUS, INTERSECT, and UNION?

  5. This is a great poster! The visuals included with each join type are really helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Time limit is exhausted. Please reload CAPTCHA.