TSQL Basics Part 8: RIGHT OUTER JOIN w/ exclusion – Video Explanation
This is part 8 “right outer join with exclusion” 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.
>>> Try our JOIN Types Course Today!
Transcription:
Now the RIGHT OUTER JOIN with exclusion, we’re just throwing in a where clause that says where table one’s foreign key is not. And it returns all the rows from table two that don’t match the table one. So this, this one, the RIGHT OUTER JOIN with exclusion. And again, I’m just going to run the first part without the where clause first. And when we run that we can see, whoops, I like the right part, we can see that we get back exactly the same thing we saw on the RIGHT OUTER JOIN before. But what we want to do is find the three colors that aren’t chosen by anyone that comes back as pink, mauve, and orange. So that would be the colors that you do not want to print any t shirts for people. You don’t have any t-shirts made for people of those colors, because nobody seems to enjoy those colors.
Also, just a 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