comma join
The old join syntax that lists tables separated by commas in FROM and puts the pairing rule in WHERE.
In more detail
It works, but the rule sits far from the table it belongs to and is easy to forget, which produces a Cartesian product. Prefer explicit JOIN with ON.
Example
FROM customers, orders -- no rule: every pairRelated terms
- Cartesian product — Every possible pairing of one item from each of two sets, so the number of pairs is the product of the two sizes.
- join — Combining rows from two tables into one result by pairing rows according to a rule, usually matching keys.
- ON clause — The part of a join that states which rows of the two tables belong together.
Taught in
- Inner Joins And Table Aliases — PostgreSQL, Indexing & Relational Data Modeling
- Cross Joins And Cartesian Bugs — PostgreSQL, Indexing & Relational Data Modeling