From the course: Advanced SQL: Logical Query Processing, Part 1
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Joining multiple source data sets - SQL Tutorial
From the course: Advanced SQL: Logical Query Processing, Part 1
Joining multiple source data sets
- [Instructor] So far, we've looked at from clauses with one and two source data sets. But often we need to join more than two sources. The easiest way to visualize multi source processing is to look at two sources at a time and work our way down. Think about the result of the join between A and B, as new set, which in turn is joined to C, forming a new intermediate set, which in turn is joined to D and so on. When dealing exclusively with inner joins, the order in which the source data sets are joined does not affect the result. Some databases will process multiple inner joins in the same order they are spelled out in the query. Other databases that have smarter cost based query optimizers such as Oracle and SQL Server, will estimate and execute these joins in the most efficient order that they see fit, regardless of the order in which they are spelled out in the query. For outer joins, the processing order is critical…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.