Top Menu

Search This Blog

SQLCROSS JOIN

Cross join does not combine the rows, if you have 8 rows in table_1 and 5 rows in table_2 in each table with 1 to 1 match, you get 40 results.

Syntax:

SELECT * FROM table_1_name cross join table_2_name  

OR

SELECT * FROM table_1_name , table_2_name  

As you see,In this tutorial we have two tables like this table(1) "Departments" and table(2)  "Employee".

Table 1(Departments):















  Table 2(Employee):  











 


Example:

SELECT * FROM Employee cross join Departments

Output:


Post a Comment

Designed by OddThemes | Distributed By Gooyaabi Templates