From the course: MySQL Data Analysis

Unlock this course with a free trial

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

INNER JOIN example

INNER JOIN example - MySQL Tutorial

From the course: MySQL Data Analysis

INNER JOIN example

- [Instructor] Okay, let's talk more about INNER JOIN, and then we'll get into a demo to show you exactly how it works. So INNER JOIN lets you pull records from two tables at once, and it only returns records when the JOIN ON logic produces a match. After the FROM clause, we add INNER JOIN, followed by the name of the table we want to join to, and then followed by the logic for how we want the server to perform the join. We'll get into what that means in a second. When you write queries using multiple tables, you need to specify both the table and the column name in your SELECT statements. Again, I'll show you that in the demo. Let's jump over to Workbench, and I'll walk you through a couple examples. Okay, so here, I've got a fairly simple query. I'm selecting DISTINCT inventory_id FROM inventory. And I'm running a LIMIT 5000. So LIMIT 5000 may be new to you. One thing you may have noticed previously is the responses had been limited to 1,000 rows. The default limit that comes in…

Contents