The following article mainly introduces Oracle left join and right join, oracle left join and right join are widely used in a short time because of its unique functions. The following describes the relevant content.
(1) Oracle left join contains all records in the left table of join in the query results and matching records in the right table of join.
(2) right join: all records in the right table of join and matching records in the left table of join are included in the query results.
(3) full join includes join in the result.
Example:
Select
Nvl (left _. dummy, 'This is all on the right') left_dummy,
Nvl (right _. dummy, 'This is all on the left') right_dummy
- from dual left_ left JOIN dual right_
- on left_.dummy||'d' = right_.dummy
Select
Nvl (left _. dummy, 'This is all on the right') left_dummy,
Nvl (right _. dummy, 'This is all on the left') right_dummy
- from dual left_ RIGHT JOIN dual right_
- on left_.dummy||'d' = right_.dummy
Select
Nvl (left _. dummy, 'This is all on the right') left_dummy,
Nvl (right _. dummy, 'This is all on the left') right_dummy
- from dual left_, dual right_
- WHERE left_.dummy||'d' = right_.dummy(+)
The above content describes Oracle left join and right join, hoping to help you in this regard.