by King Dina on April 15th, 2005

King Dina

Question

Help answer this question below.

What is the difference between a left outer join and a right outer join?

Answers. 1 helpful answer below.

  • by BuzbyB on August 18th, 2005

    BuzbyB

    No difference whatsoever - it just depends on which way you look at the tables.

    SELECT * FROM CUSTOMERS
    LEFT OUTER JOIN SALES ON CUSTOMERS.CUSTOMERID = SALES.CUSTOMERID

    is exactly the same as

    SELECT * FROM SALES
    RIGHT OUTER JOIN CUSTOMERS ON SALES.CUSTOMERID=CUSTOMER.CUSTOMERID


    A LEFT join means 'take all the records from the LEFT table (first table in the query) and then pick up any matching records from the RIGHT table)

    A RIGHT join means 'take all the records from the RIGHT table (second table in the query) and then pick up any matching records from the LEFT table)

    People that read left to right tend to use LEFT JOIN.

    No comments. Post one | Permalink

Want to attach an image to your answer? Click here.

Did this answer your question? If not, then ask a new question or create a poll.

More Questions. Additional questions in this category.

You're reading What is the difference between a left outer join and a right outer join?

Follow us on Facebook!

Related Ads

ANSWERBAG BUZZ

Difference between left outer join and right outer join
Difference between left and right outer join
Difference between right outer join and left outer join
Difference between left join and right join
What is the difference between left outer join and right outer join