Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Outer Join concept(Need of both left and right outer join)

user973654Dec 7 2017 — edited Dec 10 2017

Dear Senior members,

There are left outer join and right outer join in oracle.

Suppose there two tables A(col1,col2,col3) and B(col1,col4,col5) .

If I perform  Data1= select A.col1, col2,col4 from A left outer join B on A.col1=B.col1;

                    Data2= select A.col1, col2,col4 from A Right outer join B on A.col1=B.col1; 
                      Data3= select A.col1, col2,col4 from B left outer join A on A.col1=B.col1;

Here outcome is Data2=Data3

if I can get Data3 by just swapping the tables A's and B's positions then why oracle has other outer join.

(I mean if I''ll use left outer join then there is no need of right outer join because I can achieve right outer join's result by just swapping the positions of table A and B in left outer join and vice-versa ).

Please guide.

Thanks & Regards Ram

This post has been answered by Mark D Powell on Dec 8 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2018
Added on Dec 7 2017
12 comments
1,016 views