MySQL CROSS JOIN

Last Updated: March 13, 2022

MySQL CROSS JOIN will return all records from both tables.

MySQL CROSS JOIN Syntax

SELECT column_name(s)
FROM table1
CROSS JOIN table2; 

Example

The following example shows you how to do CROSS JOIN with tableX and tableY

table join inner 2
SELECT  * FROM tableX 
CROSS JOIN  tableY 

You can have the following results

cross join result
Test