Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    250

    Unanswered: Why Right Outer Join ?

    Why do we need a Right outer join, when we get the same results by swapping the order in which tables are specified in a Left join?
    Cheers....

    baburajv

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Why indeed? I can't find it right now (snicker) but Jeff at SQLTeam is on a one man mission to eliminate them from SQL. The only time I know that you need them is if you using a join hint as the order of the tables in the join hint dictates which is the outer and which is the inner table.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    nice article (as expected, from that guy)

    also noted blindman's acerbic comment

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by r937
    nice article (as expected, from that guy)

    also noted blindman's acerbic comment

    Thanks! I copied and pasted the link myself you know
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Acerbic? I thought it was erudite!
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  7. #7
    Join Date
    Mar 2002
    Location
    London, UK
    Posts
    24
    Yes, I agree that there is no need to have RIGHT and LEFT (both but at least one is needed).

    You can always stick with LEFT (or RIGHT) and just switch table positions based on your requirement.

    I have no idea why both keywords are needed, may be the reason that LEFT OUTER JOIN is supposed to be used by LEFTies and vice versa.:d

    --Riaz

    Quote Originally Posted by baburajv
    Why do we need a Right outer join, when we get the same results by swapping the order in which tables are specified in a Left join?

  8. #8
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by blindman
    Acerbic? I thought it was erudite!
    possibly

    but wait a sec, aren't you the guy that likes to type out the entire table name qualifier on every column, so as to avoid using table aliases altogether?

    erudite, my aunt fannie!
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  9. #9
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by r937
    but wait a sec, aren't you the guy that likes to type out the entire table name qualifier on every column, so as to avoid using table aliases altogether?
    here we go again.....
    Testimonial:
    pootle flump
    ur codings are working excelent.

  10. #10
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Erudite does not mean concise! One can be both verbose and erudite!
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •