I have two tables
A id, b_id
and
B id, arbitrary_binary_value
arbitrary_binary_value is really a field that is 1 or 0, each otherwise unique row is duplicated with a 1 and a 0, this is just some db I am working with
Anyway, I wrote a query
select * from a left join b on a.b_id = b.id
where b.arbitrary_binary_value = 0
and I thought it would yield the same number as
select * from a
but it did not,
so I changed query to
select * from a left join b on a.b_id = b.id
AND b.arbitrary_binary_value = 0
and it did yield the same number as the number of rows in a, as expected
Why did the where clause not behave as expected, when the and clause did?