bing
Flat 10% & upto 50% off + 10% Cashback + Free additional Courses. Hurry up
×
UPTO
50%
OFF!
Intellipaat
Intellipaat

What is Full Join in SQL?

Full Join is a keyword, which is used to select all records from the right table and also from the left table.

Watch this Full Join in SQL video

Full Join in SQL

The Full Join basically returns all records from the left table and also from the right table. For example, let’s say, we have two tables, Table A and Table B. When Full Join is applied on these two tables, it returns us all records from both Table A and Table B. If the condition is not met, then null value is displayed instead.

A Brief Introduction to Full Join

Syntax

SELECT columns
FROM table1 name
FULL JOIN table2 name
ON table1.coumn_x = table2.column_y;

where SELECT, FULL JOIN, and ON are the keywords, columns is the list of columns, table1 is the first table and table2 is the second table, and column_x and column_y are the columns for performing Left Join, followed by a semicolon.

Example

Let’s apply Full Join to two tables, the employee table and the department table

Select employee.e_name, employee.e_dept, department.d_name, department.d_location from employee

FULL JOIN department

ON employee.e_dept = department.d_name;

Syntax

After writing the query, click on the execute button to check for errors. Once the query is executed, a message appears like ‘Commands completed successfully’.

This brings us to the end of this tutorial sections on JOIN operators.

Previous Next

Download Interview Questions asked by top MNCs in 2019?

"0 Responses on Full Join in SQL – SQL Full Joins"

    Leave a Message

    100% Secure Payments. All major credit & debit cards accepted Or Pay by Paypal.
    top

    Sales Offer

    Sign Up or Login to view the Free Full Join in SQL – SQL Full Joins.