Understanding Joins

I'm going to teach you a way to think about joins. This method of understanding joins will help you visualize what happens when you write multitable queries. This will make it easier to learn how to write joins and will help you through the more complex cases that you will confront in real life.

Note

Although the method I will teach you will help you understand how queries with joins could be resolved, the server uses a number of efficient tech niques to speed up joins. To be honest, the server cheats in any way it can. So, what you are about to learn might help you a lot, but don't expect the server to use this method.

To get a better handle on joins, let's improve one of the queries from yesterday's lesson. We were writing ...

Get Sams Teach Yourself Transact-SQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.