If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Difference in Left Outer and Right Outer Join

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-14-11, 03:11
alirulez999 alirulez999 is offline
Registered User
 
Join Date: Jan 2010
Posts: 25
Difference in Left Outer and Right Outer Join

We all knows the difference between a Left and Right Outer Join,
Lets says we have two tables A and B.
A a Left Outer Join B b On (a.id =b.id)

This means all record from table A will be displayed even if there's not a matching record in Table B.

Now if I want a right Outer Join betwee A and B, then instead of using a Right Outer Join I can get the same result using the below query
B b Left Outer Join A a On (b.id =a.id).

So why there's a need of right Outer join, if the same can be achieved using a Left Outer Join?
Reply With Quote
  #2 (permalink)  
Old 03-14-11, 04:14
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,538
Quote:
Originally Posted by alirulez999 View Post
So why there's a need of right Outer join, if the same can be achieved using a Left Outer Join?
that's a good question
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On