by barrkel · 7y ago · 0 comments
The 'FROM' clause defaults to Cartesian product for multiple tables. You can then specify your join conditions in the where clause, but it makes outer joins harder to write - Oracle does them with special (+) operator, but it's clumsy.
It doesn't (shouldn't) make much difference at all to the database whether you specify your join condition after the `ON` or in the `WHERE` - if it doesn't hoist `WHERE` conditions into the join clause, and potentially change the join order because of it, it's missing big optimization opportunities.
I can't imagine any reasonable way to do outer joins in a where clause.
For inner joins the grandparent is correct and it should never matter whether you use ON or a where clause.
Of course it's weird and ugly. I don't think there's anything to recommend it over ANSI join syntax.