From the course: SQL Essential Training

Unlock the full course today

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

The LEFT JOIN

The LEFT JOIN

- [Instructor] A left outer join combines all the records from the left table with any matching records from the right table. As shown in our Venn diagram, the concept of left table and right table depends entirely on the order these tables are listed in the join statement. So for example, our SQL statement here has listed invoices first. Then after the left outer join, it lists the customer table. And in this instance, our invoice table is the left table and our customer table is the right table. With this type of join, everything in our invoice table will be displayed. Since customer one did not order any songs, that particular record is omitted. However, as we can see in our simplified invoice and customer table, we are combining all five records from the invoice table with only three records from the customer table. Remember, there is no record for customers number one or number five in the invoice table, and customer…

Contents