From the course: MySQL Data Analysis

Unlock this course with a free trial

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

Multi-table querying

Multi-table querying - MySQL Tutorial

From the course: MySQL Data Analysis

Multi-table querying

- [Instructor] Now we're ready to start talking about using joins for multi-table querying. The whole point of going through these table relationships has been to enable multi-table querying. In SQL, we're going to use join statements to do this by writing the table relationships directly into our queries. Take for example, our inventory table and our film table. What if we were trying to create a query to produce another table that shows all film titles in each store's inventory? Title and store ID live in separate tables, so we can't get both of these things from just one table. We're going to need to use a join. Here's the syntax for join. Just a quick sneak peek at what MySQL join queries look like. We'll get into detail later. For now, just notice that you are pulling data from film and then you're joining to the inventory table and you're prescribing how that's going to happen. Again, don't worry about the details now, just trying to illustrate the concept.

Contents