An SQL left join query ignores an ON column = constant
predicate on the left table.
However, it cares about another ON column = cons
The point is that the ON
clause for a LEFT [OUTER] JOIN
only regulates whether a row from the right table is joined.
It does not filter rows from the left table. If you want to do that, the expression has to go into a WHERE
clause (as you found out already) or the ON
clause of a [INNER] JOIN
.
That's all by design.