You are on page 1of 25

2 plus 3 coulmns result to 5 coulumns

1 * 4 rows

2 * 4 rows

Leading to 8 rows total


If the tables are large a cross join can crash your database in a production setting.
Think of an inner Join as a cross join with a filter condition: The filter condition is supplied by who is
writing the join.
The number of rows in the output is going to be less than or equal to the product of x and y

V lookup and H lookup functions - Spreadsheet equivalent of inner join


The filter or Join condition is what comes after the ON keyword.
The second part of what comes in the ON condition is the filter:
The filter condition only restricts the rows of the output. It does not change the columns.

The are two versions of the STORE ID column and this is what will be filtered on – on the basis of
equality.
Before the filter, you have the cross join:
Finally we get the real results below:

Outer Joins:
3 flavors of outer Joins
Movie ID = 1 in the query is key
Right Outer Join:
In a right outer Join, if there is no matching rows in the left table with the rows on the right then the left
output will be padded with NULLS.
A combination of the left and right

You might also like