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:
OR
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:
Output:
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