Table of Contents
MySQL Cross Join:
The CROSS JOIN clause returns the Cartesian product of rows from the joined tables. Suppose you join two tables using CROSS JOIN. The result set will include all rows from both tables, where each row in the result set is the combination of the row in the first table with the row in the second table. For example, if each table has 7 rows, you will get 7 x 7 = 49 rows in the result set.
MySQL Cross Join Syntax:
SELECT column_name (s) FROM table1 CROSS JOIN table2 ON table1.column_name = table2.column_name; |
Sample Table:


MySQL Cross Join on Sample Table:

Comments (No)