SQL Queries: Inner Joins vs Outer Joins (Left and Right)

Описание к видео SQL Queries: Inner Joins vs Outer Joins (Left and Right)

In this video we look at Inner Joins versus Outer Joins. We are using the NorthWind database supplied on the w3schools site. An Inner Join supplies the records that combine data from two tables only when the there is some match -- typically a foreign key in one table matching a primary key in the other. An Outer Join will include some un-matched records. A LEFT JOIN will include all matched records as well as any unmatched records from the table on the left (the one that appears earlier in the query). In our example we matched Employees with the Orders that have taken. The LEFT JOIN included records (in this case one record) of an Employee who did not take an Order. Similarly there's a RIGHT JOIN in which the unmatched records come from the table that appears on the right (later in the query).

Комментарии

Информация по комментариям в разработке