CROSS JOIN row count is a product.

highlighted = computed this step

Product row count

The output row count is the left row count times the right row count.

product count\text{product count}

Read the count

2 left rows times 3 right rows makes 6 output rows.

output rows=6\text{output rows}=6

CROSS JOIN examples are tiny finite-table transforms; SQL dialect completeness, type coercion, optimizer behavior, execution cost, indexing, and database-product claims are out of scope.

Product row count: left tablecolorredblue Product row count: right tablesizeSML pair gridleftSourcerightSourceleftValuesrightValuesoutput00[red][S][red, S]01[red][M][red, M]02[red][L][red, L]10[blue][S][blue, S]11[blue][M][blue, M]12[blue][L][blue, L] CROSS JOIN output rowsleft.colorright.sizeredSredMredLblueSblueMblueL CROSS JOIN factsfactvalueleftRowCount2rightRowCount3pairCount6outputRowCount6outputColumnCount2rowOrderleft_source_then_right_sourceemptySideProductno

No hidden rows

The pair grid and output table show the same row count.

pairs equal output rows\text{pairs equal output rows}

Summary

A CROSS JOIN can grow quickly because it uses multiplication.

multiplication visible\text{multiplication visible}