MySQL Cross Join

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 student table example
sample city table in mysql

MySQL Cross Join on Sample Table:

Cross Join Query in MySQL

MySQL Inner Join
MySQL Left Join and Right Join
Natural Language Processing (NLP)
What is Virtual Reality?
Operating System as a Resource Manager
Multimedia and Its Application
MySQL– Wikipedia

Comments (No)

Leave a Reply