Loading, please wait...

Full Join

How To Use Full Join In SQL

 

Introduction:
In this article, you will learn, what Full Join is and how to use Full Join in SQL.
Full Join returns all the data from both the tables. If our condition does not match any row, it represents the null value. Full Join is known as Full Outer Join.

 

Here, we have two tables-

 

Employee Table

 

 

 

Query Table

 

 

 

Now, we collect same records in both the tables, according to our condition.

 

Syntax

The syntax of Full Join is as follows.

select table1.column1, table2.column2... from table1 full join table2 on table1.common_field = table2.common_field;

 

Example

Step 1: We write our query for Full Join.

 

 

 

Now, select and execute this query.

 

Step 2: The output of this query is:

 

 

 

Summary:
Thus, we learned, full join shows all the data from each table and its use.