From the course: MySQL Data Analysis

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Multi-condition joins

Multi-condition joins - MySQL Tutorial

From the course: MySQL Data Analysis

Multi-condition joins

- [Instructor] All right. So now that you're getting sort of advanced, we're ready to start talking about multi condition joins. Up until now, when we've joined from one table to another, we've only set one specific rule in which we need to make that join. For example, table A, column one equals table B, column three. That's an example of a single condition join. Now we're going to talk about multi condition joins. So take this example where we're joining from film to film category, to category, and we have a where condition because we want to limit to films where their category is horror. Now take a look at this other query. Notice there's no where condition. We've taken that where condition and we've brought it into the join to category. This is an example of a multi condition query. So that top query joins film to film category, to category, bringing in all the records, and then filters down that record set to just films where category name equals horror. The query on the bottom…

Contents