Solved

"Left Join" versus "Outer Join" in MySQL

Posted on 2007-11-16
4
4,172 Views
Last Modified: 2008-02-01
Someone asked me what is the difference between a "Left Join" and an "Outer Join" in MySQL.

My understanding is that they are the same.

Essentially there are three types of join: Left Outer, Right Outer, and Inner. All the others are just names for these.

Is this correct?
0
Comment
Question by:sypder
  • 2
  • 2
4 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20301772
outer join, per se, does not exist. you have to specify LEFT / RIGHT OUTER JOIN.

LEFT JOIN / LEFT OUTER JOIN  are the same.
RIGHT JOIN / RIGHT OUTER JOIN are the same.

please see this page for explanations about the different JOIN s:
http://en.wikipedia.org/wiki/Join_(SQL)
0
 
LVL 3

Author Comment

by:sypder
ID: 20302032
Exactly, this is my understanding.

So what does the question "explain the difference between LEFT JOIN and OUTER JOIN" mean. Since like you said there is no OUTER JOIN and a LEFT JOIN is a LEFT OUTER JOIN.

Unless they meant to write INNER JOIN or it is a trick question.
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 20302088
if you study the following mysql document, you will see confirmed that the OUTER keyword is optional, and cannot stand alone:
http://dev.mysql.com/doc/refman/5.0/en/join.html

so, either indeed this is a typo, or a trick question...
0
 
LVL 3

Author Comment

by:sypder
ID: 20302098
Thanks for confirming that. I did read that document.

It was in a job description I was applying for and it listed that knowing the difference was a key skill. So I figured I should be sure I am right before I head in.

Thanks.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question