If you completely exclude the WHERE , using the LEFT OUTER JOIN means that all rows from the table will appear on the left side, even if they do not meet the JOIN criteria. For example, no lines satisfy the expression 1 = 0 , but this:
SELECT * FROM table1 AS a LEFT OUTER JOIN table2 AS b ON a.Id = b.Id AND 1 = 0;
still returns all rows in table1 where id values ββmatch. Simply put, OUTER JOIN works.
The WHERE applies after JOIN , so this
SELECT * FROM table1 AS a LEFT OUTER JOIN table2 AS b ON a.Id = b.Id WHERE 1 = 0;
will not return rows.
source share