From the course: SQL Essential Training

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

The INNER JOIN

The INNER JOIN

- [Narrator] So let's talk about the inner join. An inner join only returns matching records. Any unmatched data from either table is ignored. Joins are often described with the use of Venn diagrams. As our Venn diagram shows, an inner join represents only the overlapping section of the Venn diagram. Now, if we take a look at our simplified invoice and customer tables, we can see that our inner join will ignore invoice number five. And that is because this invoice refers to customer six, and this customer does not appear in our customer table. Likewise, customer one and customer five from the customer table did not generate any invoices. In other words, they do not have any records in the invoice table. So that record is ignored as well. As the Venn diagram shows, only the overlapping data is included. Now, if we revisit the code that we generated to produce this inner join, we can see that this is the exact SQL…

Contents