TSQL Basics Part 19: TWO LEFT OUTER JOINS – Video Explanation
This is part 19 two left outer JOINS of a 19 part series on TSQL Basics. You will first gain an understanding of the differences between each of these types of JOINS, and when they should be used. Then we’ll explore some common uses for JOINS, such as replacing a not in clause with JOIN to get the same results with better performance. You will take home the right foundations to get at the data that you want. Make sure to check of the other parts in this series in my JOIN Types playlist.
>>> JOIN Confused? Try our JOIN Types Course Today!
Transcription:
Next, we’ll take a look at TWO LEFT OUTER JOINS. And remember the LEFT OUTER JOINS show everyone from the first table, and it shows who they match on the other tables. If they match, otherwise, it shows nulls. So in this example, it’s going to show everyone from table one matched up with those people, those things they match up with from table two and three. Or if they don’t match, it’ll show NULLS.
So here, we only got one result back when we did the INNER JOIN. When we switch it over to a LEFT OUTER JOIN, we get more rows back, we get the duplicated rows for those people who had the favorite color with multiple colors of red and indigo, for instance.
But then we see that we get Johnny and Karen who don’t have a favorite color. But we do see that they do have a favorite, favorite food over here in this in the other LEFT OUTER JOIN. This is kind of a way to say look at everyone, not just those who are who are matched.
Also, just reminder, you can download the join types poster at SteveStedman.com. And this is a poster I created a few years ago that just sort of shows how all the different joins that we’re going to be covering through this presentation are done. It’s handy to print out and keep on your cube wall or near your workspace.
Our JOIN Types Course Comes With:
• Easy to understand lectures with examples
• Assignments
• Sample code to work with
More from Stedman Solutions:
Steve and the team at Stedman Solutions are here for all your SQL Server needs.
Contact us today for your free 30 minute consultation..
We are ready to help!
Leave a Reply