Cross Join

SQL CROSS JOIN

The CROSS JOIN returns the Cartesian product of the tables involved in the join.

SQL Cross Join syntax

SELECT column_name(s)
FROM A_table CROSS JOIN B_table;

Test1

ID TITLE
1 aaa
2 bbb
3 ccc

Test2

ID TITLE
1 ttt
2 qqq

Example

SELECT *
FROM Test1 
CROSS JOIN Test2;

Results

ID TITLE ID TITLE
1 aaa 1 ttt
2 bbb 1 ttt
3 ccc 1 ttt
1 aaa 2 qqq
2 bbb 2 qqq
3 ccc 2 qqq