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;
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
No comments:
Post a Comment