skip to today's puzzle
SQL Sip

CROSS JOIN makes every possible pair

CROSS JOIN pairs every row from the first table with every row from the second. Two breads and two fillings produce four pairs. It has no ON condition because no rows are being matched. Use it deliberately: large tables can create a very large result.

A tiny example

In plain English: Show me every possible pairing of a bread with a filling.

SELECT breads.name AS bread, fillings.name AS filling
FROM breads
CROSS JOIN fillings;

What comes back

breadfilling
ryecheese
ryeegg
sourdoughcheese
sourdoughegg

2 breads × 2 fillings = 4 pairs — one row for every combination.

Related SQL lessons

Ready for a break?

Take on today's cozy puzzle. A fresh, bite-sized query waits every morning — no timers, no pressure.

play today's sip