Solved

"Left Join" versus "Outer Join" in MySQL

Posted on 2007-11-16
4
4,164 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 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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
Comment Utility
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 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
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 …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now