SQL 101: Cross Joins And Their Use Cases

A Quick Overview Of Cross Joins And When To Use Them

Jon McEwen

--

Photo by Michał Kubalczyk on Unsplash

In a cross join, each row of the left table is joined to each row of the right table. The output of a cross join effectively multiplies the row counts of each table together.

10 row table * 10 row table = 100 output rows
5 row table * 10 row table = 50 output rows
20 row table * 20…

--

--