LEFT and RIGHT OUTER join - Traditional join method | Oracle SQL fundamentals

Опубликовано: 27 Декабрь 2018
на канале: DBA Genesis
1,384
8

There are two kinds of #OUTER #joins in #SQL, LEFT OUTER join and RIGHT OUTER join. The main difference between RIGHT OUTER join and LEFT OUTER join, as their name suggest, is the inclusion of non-matched #rows.
Since #INNER #join only include matching rows, where the value of joining #column is same, in the final result set, but OUTER join extends that functionality and also include unmatched rows in the final result. LEFT outer join includes unmatched rows from table written on the left of join predicate. On the other hand, RIGHT OUTER join, along with all matching rows, includes unmatched rows from the right side of the table.
In short result of LEFT outer join is INNER JOIN + unmatched rows from LEFT table and RIGHT OUTER join is INNER JOIN + unmatched rows from the right-hand side table.

Website: https://www.dbagenesis.com/
Facebook:   / dbagenesis  
Instagram:   / dbagenesis  
Twitter:   / dbagenesis