tags:

views:

372

answers:

4

What is result difference between:

  1. RIGHT JOIN and RIGHT OUTER JOIN
  2. LEFT JOIN and LEFT OUTER JOIN ?

Can you please explain through the examples ?

+30  A: 

There is no diffrence between Right Join and Right outer Join both are same. i.e Left Join and Left Outer Join both are same.

This will give you clear idea :

Visual Representation of SQL Joins

alt text

Pranay Rana
That's my new goto image for joins.
Graphain
This image is probably the best/quickest way to explain the differences between the different types of joins to someone. Good find.
Lèse majesté
Andrew Heath
Because you sometimes join more than 2 tables together and it just gives you more flexibility in how you choose to write out the query.
Lèse majesté
When you look at this image for a while and think about this, the word "join" starts to look silly and make no sense.
Arve Systad
thnkssssss for reply
Pranay Rana
This is a bit confusing - it gives the impression that `A LEFT JOIN B` is the same as `A`. Is there any difference between the excluding joins and `EXCEPT (SELECT A.* FROM A INNER JOIN B ON A.Key = B.Key)`?
BlueRaja - Danny Pflughoeft
It is true you can get away without the right join as it can always be expressed as a left join if you reverse the tables. However, sometimes you have a complicated query written and find you need an outer join and it is sometimes simpler to use the right join rather than reorder the tables in a complicated join.
HLGEM
+1  A: 
  • SQL Server Forums - Differences between Left join & Left outer join

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=53046

  • LEFT JOIN vs. LEFT OUTER JOIN

http://itknowledgeexchange.techtarget.com/itanswers/left-join-vs-left-outer-join/

  • PL/SQL - What is the difference between right join and right outer ...

http://www.geekinterview.com/question_details/53637

ratty
+7  A: 

Here's a very nice Visual Explanation of joins generally by our very own Jeff Atwood. A right outer join is the same as a right join, and left join and left outer join are also the same.

Leonard
NICE EXPLANATION.......................
Nishant
+3  A: 

What is result difference between:

RIGHT JOIN and RIGHT OUTER JOIN

No difference.

LEFT JOIN and LEFT OUTER JOIN ?

No difference.

Simply put, the OUTER keyword is optional. You can include it or omit it without affecting the resultset.

onedaywhen