SQL CROSS JOIN creates a Cartesian product of two tables, meaning it returns every possible combination of rows from both tables. It does not use a join condition, and the total number of rows in the result is the number of rows in the first table multiplied by the number of rows in the second table. It is useful for generating all combinations of data.

Syntax:
SELECT * FROM table1
CROSS JOIN table2;
Examples of SQL CROSS JOIN
Before diving into queries, let’s create two sample tables: Customer and Orders. These tables will help us understand how CROSS JOIN combines data into multiple combinations.


Query:
SELECT *
FROM Customer
CROSS JOIN Orders;
Output:

Explanation: CROSS JOIN combines every row from the Customer table with every row from Orders table. Since there are 2 customers and 2 orders, result contains 2 × 2 = 4 rows.