Full join - DotNet and DataBase

Wednesday, 1 August 2018

Full join




FULL JOIN is used to retrieve all data from two or more tables by comparing common fields.
FULL JOIN Query returns all rows from LEFT and RIGHT tables.
Not matching rows from LEFT and the RIGHT table will be returned with the NULL value.

Syntax:
SELECT column_name(s)
FROM table1
FULL JOIN table2
ON table1.column_name=table2.column_name;


Example:
SELECT E.EmpID,E.EmpName,E.DeptID, D.DeptID, D.Department FROM tbl_Employees E
FULL JOIN tbl_Dept D ON

E.DeptID = D.DeptID

Result
FullJoin














No comments:

Post a Comment

x

Get Updates On

Discussion updates

Straight Into Your INBOX!

Enter your email address to subscribe to this website and receive notifications of new posts by email.