SQL joins made visual

Most people new to databases would come across the need to join or combine data from two, or more, tables. In the SQL (Structured Query Language) world this is done by means of “Joins”. Below is a wonderful visual representation of how joins work and what to expect from them. Thank you Mr Moffatt. His full post is available here.

Technically you only need to know 5 join types, not 7 as depicted below. The reason is that a “right join” is the exact opposite of a “left join”. They both accomplish the same result if you arrange TableA and TableB accordingly.

SQL Joins

Advertisements
This entry was posted in SQL Server 2014 and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s