PostgreSQL Outer Join

An Outer join is also used to obtain unmatched records from tables involved in joining. It first performs an inner join and then obtains unmatched records from the table based on the type of Outer join.

LEFT OUTER JOIN: Left Join is used to return all data or records from the Table 1 plus match records to tables 2.
RIGHT OUTER JOIN: Right Join is used to return all data or records from the Table 2 plus match records to tables 1.
FULL OUTER JOIN: Full Join is used to return all data or records when a match occurs in a Table 1 or Table 2 record
Outer Joins Syntax :

The syntax of the Outer Joins statement is −

SELECT col_name,...
FROM table_name1 t1  [LEFT | RIGHT | FULL ] JOIN table_name2 t2
ON t1.col_name = t2.col_name



Visit :


Discussion



* You must be logged in to add comment.