The FULL OUTER JOIN returns all(both LEFT and RIGHT joins.) record from the left table (table_1) and from the right table (table_2).
Syntax:
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
FULL OUTER JOIN table_2
ON table_1.column_some_name=table_2.column_some_name
FROM table_1
FULL OUTER JOIN table_2
ON table_1.column_some_name=table_2.column_some_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 Departments e1 FULL OUTER JOIN Employee e2
ON e1.id = e2.DepartID
ON e1.id = e2.DepartID
Output:
Post a Comment