CROSS JOIN: The Cartesian product — every row of A paired with every row of B. No ON clause. A CROSS JOIN combines every row of one table with every row of another. With three sizes and four colours, it returns twelve rows, one for each combination. That is useful when you really need all combinations. Generating product variants, building a calendar of every day for every employee, or filling a report so empty combinations show up as zero are typical cases.
The danger is size. Two tables of 10,000 rows produce 100 million rows. An accidental cross join, often caused by forgetting the join condition in older comma-style syntax, can bring a database to its knees. If a query suddenly returns far more rows than expected, check every join for a missing ON clause first.
What does an example of CROSS JOIN look like?
SELECT s.size, c.color FROM sizes s CROSS JOIN colors c;