SQL Flow Field Guide

CROSS JOIN

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

every left row paired with every right row

What changes

Input
two input rowsets
Output or change
Cartesian product

Syntax at a glance

table_source CROSS JOIN table_source

Work example

Two small sources need every possible pair, such as a grid of sizes and colors.

Count each input first. Multiply those counts and compare the product with the CROSS JOIN result.

Check your work CROSS JOIN. The output row count is the product of the input counts and no join predicate is applied.

Open Microsoft Learn for full syntax, permissions, and details for your version.