This is a discussion on Beginners question on LEFT JOINS within the MySQL forums, part of the Database Server Software category; --> Yeah, I know this was KINDA covered in databases, but could somebody give me a refresher of what a ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| "John Meyer" <john.l.meyer@gmail.com> wrote in message news:BbCdnUllJ9IlJjDeRVn-uQ@comcast.com... > Yeah, I know this was KINDA covered in databases, but could somebody give > me > a refresher of what a left join is in, say, terms of tables FOO and BAR. > Thanks. http://www.firstsql.com/tutor3.htm#outer Regards, Bill K. |
| |||
| Bill Karwin wrote: > > http://www.firstsql.com/tutor3.htm#outer > > Regards, > Bill K. Kind of get that one. It's a little bit harder to get my mind around that one. For instance, listing all orders that don't have any items on them, would that be an instance where you would use an OUTER/LEFT join. |
| ||||
| "John Meyer" <john.l.meyer@gmail.com> wrote in message news:GKidndMlHPZAUDDenZ2dnUVZ_sWdnZ2d@comcast.com. .. > For instance, listing all orders that don't have any items on them, > would that be an instance where you would use an OUTER/LEFT join. Yes, probably. (it's hard to give a blanket answer because I don't know for sure what your database structure is) Here's another link that describes outer joins concisely and gives an example: http://en.wikipedia.org/wiki/Outer_join#Left_outer_join I am reluctant to write a long description of how outer joins work, because there are many resources on the internet that explain this already. Do a google search for "sql outer join tutorial" or something. I sympathize that the typical SQL book doesn't cover this topic well. Try reading "SQL for Smarties" by Joe Celko. Regards, Bill K. |