Understanding INNER join in detail

  • Simon Facer

    :

    "And (I know other have said it already) PLEASE quit complaining about the lady's command of the English language. "

    Simon Facer, just wondering what makes you think that Susantha is a 'lady', ie female???

    Also, seems that a lot of people may have missed Steve's post where he says that he may have accidentally uploaded the un-edited version. Hey, we all make mistakes...

    Keep up the good work Steve, and don't be disheartened Susantha. Putting yourself up for critical review can seem very unrewarding sometimes...

    [edit] Doah!!! ...taken the spelling mistake out 😉

  • humbleDBA...

    The correct spelling of Homer Simpson's now-famous exclaimation is "Doh" not "Doah" - if that is what you intended...

    (Sorry - let's face it, we yanks have ruined the English language for sure, but couldn't resist hitting a UK'er with this one!) 😀

    There's no such thing as dumb questions, only poorly thought-out answers...
  • I was actually expecting this article to show me why I needed the "INNER" keyword when using "JOIN".

    I always just use "JOIN" without the "INNER" and I was wondering if there was something more I could do if I used the "INNER" keyword. Also, I don't user "OUTER", I just use "LEFT JOIN" or "RIGHT JOIN".

    Does anyone know if there would be some reason for me to use the keywords "INNER" or "OUTER" to accomplish something I couldn't do WITHOUT using them?

    -Marty

  • Hello Marty,

    I do not claim to be an expert, but if you just use the "join" keyword, "inner" is implied.

    If you qualify a join as "left", "right", or "full", "outer" is implied. So you would never need to use outer, either, in these three cases.

    Cross joins can be used with the phrase "cross join", in which case you have no "on" clause (matching related columns).

    -MD

  • LOL...

    Hey, blandry, I'll give you that one... 😛

    but not colour, manoeuvre, centre, etc., etc.... 😉

    [edit] Damned keyboard is just not working for me today!

  • Marty Benson (7/9/2008)


    I was actually expecting this article to show me why I needed the "INNER" keyword when using "JOIN".

    I always just use "JOIN" without the "INNER" and I was wondering if there was something more I could do if I used the "INNER" keyword. Also, I don't user "OUTER", I just use "LEFT JOIN" or "RIGHT JOIN".

    Does anyone know if there would be some reason for me to use the keywords "INNER" or "OUTER" to accomplish something I couldn't do WITHOUT using them?

    -Marty

    I use INNER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, FULL OUTER JOIN just for clarity. I realize that INNER and OUTER are implied, but that's just how I started writing SQL.

    😎

  • I use INNER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, FULL OUTER JOIN just for clarity. I realize that INNER and OUTER are implied, but that's just how I started writing SQL.

    And we know what is implied today could be required tomorrow. Although I tend not to use OUTER myself but I do use INNER.

  • humbleDBA (7/9/2008)


    Noli arrogantium iniurias pati. Vah! Denuone latine loquebar? Me ineptum.

    I give - what's it mean?

    The first sentence looks like "Be unwilling to arrogantly cause injury" ("Walk softly" or "Let he who is without sin cast the first stone".)

    The second one?? "Do you speak latin"??

    The last sentence look like "I play the fool" maybe "I'm no expert".

  • The article presents very basic concepts, which obviously was intended. People who miss the foundations, never build high. I do think the results in 4 are 5 are somewhat inverted. So far as spelling goes, I don't see any errors. In fact, I ran the article through a spell checker to see if I was going blind. There were no hits. Grammar? Some usages were a bit clumsy, but if this is a second language, as I suspect, then you might cut Susantha some slack. Whatever the case, I certainly had no trouble understanding what was written. I've read far worse, too much of it from many who should know better--witness the gentleman above who has yet to be introduced to upper case. I've noticed my own growing propensity to skip words and drop vowels. I would encourage the writer to continue to submit.

  • john.richter (7/10/2008)


    ...--witness the gentleman above who has yet to be introduced to upper case. I've noticed my own growing propensity to skip words and drop vowels. ...

    Could be a C/C++ or Unix type. Everything there is lower case.

    😎

  • I'm a bit behind on reading and replying to this article. There are already nine pages of comments! So why on Earth should I add mine? I just can't help myself.

    While I agree with the comments about grammar and phrasing, I have to point out that many native English speakers are lax about observing these rules and, in fact, quite a few of them couldn't write proper English if their lives depended on it. I do find it ironic that more than one poster complained about the grammer (sic).

    When I criticize someone's writing, which I do probably more often than is wise, I take extra care to do so in proper grammatical form. 😛

    Native English speakers should be able to recognize the difference between mistakes made by native and non-native speakers--they make different types of mistakes. Upon recognition of a non-native speaker, compassion is called for.

    Pause while I climb off the soapbox...

    I really wanted to comment on the content of the article. I would like to have seen use cases for the various types of join conditions. I believe that the inequality joins are referred to as "triangular joins."

    I also noted that the join without conditions (cross-join, Cartesian product) resulted in all permutations of the data. The >= and and < options resulted in all combinations of the data where the two columns had different values.

    While the article did show the results, the implications and uses of those join conditions was not explained.

  • Stephanie Giovannini (7/10/2008)


    ...

    I really wanted to comment on the content of the article. I would like to have seen use cases for the various types of join conditions. I believe that the inequality joins are referred to as "triangular joins."

    Actually, they're called theta-joins, with equi-join being a subset thereof where the join predicate is "=". "Triangular join" is a term coined by an author on this site.

    I also noted that the join without conditions (cross-join, Cartesian product) resulted in all permutations of the data. The >= and and < options resulted in all combinations of the data where the two columns had different values.

    While the article did show the results, the implications and uses of those join conditions was not explained.

    I brought this point up earlier in the discussion thread, but it bears repeating. It's important for users to know the implications of their query constructs.

    TroyK

  • CAGreensfelder (7/10/2008)


    humbleDBA (7/9/2008)


    Noli arrogantium iniurias pati. Vah! Denuone latine loquebar? Me ineptum.

    I give - what's it mean?

    The first sentence looks like "Be unwilling to arrogantly cause injury" ("Walk softly" or "Let he who is without sin cast the first stone".)

    The second one?? "Do you speak latin"??

    The last sentence look like "I play the fool" maybe "I'm no expert".

    The first part roughly translates to "don't let the b*****d's grind you down". More acurately, it says:

    Noli - 'don't let'

    arrogantium - 'of arrogant people'

    iniurias - 'injustice'

    pati - 'suffer'

    There are others that can be used, but IMHO this is about the best.

    You may see it something like "Illegitimi non carborundum", which is often how it's translated, but this isn't correct as carborundum is not Latin, the Latin for B******d is not Illegitimi - you somethimes see it as 'nothus a um', but this translates to 'mark shadow' or 'shade' or 'spurious, not genuine'.

    The rest you can find on google...

    Its supposed to be a light-hearted quote. 'majorbloodnock' got it (http://www.sqlservercentral.com/Forums/Topic522997-263-1.aspx#bm523145) and was able to add a last bit, too. 😀

  • Hi,

    It is a very good article. It helps me to understand the concept in-depth.

    Thanks,

    🙂

    Regards,

    Tajudeen

  • humbleDBA (7/11/2008)


    CAGreensfelder (7/10/2008)


    humbleDBA (7/9/2008)


    Noli arrogantium iniurias pati. Vah! Denuone latine loquebar? Me ineptum.

    I give - what's it mean?

    The first sentence looks like "Be unwilling to arrogantly cause injury" ("Walk softly" or "Let he who is without sin cast the first stone".)

    The second one?? "Do you speak latin"??

    The last sentence look like "I play the fool" maybe "I'm no expert".

    The first part roughly translates to "don't let the b*****d's grind you down". More acurately, it says:

    Noli - 'don't let'

    arrogantium - 'of arrogant people'

    iniurias - 'injustice'

    pati - 'suffer'

    There are others that can be used, but IMHO this is about the best.

    You may see it something like "Illegitimi non carborundum", which is often how it's translated, but this isn't correct as carborundum is not Latin, the Latin for B******d is not Illegitimi - you somethimes see it as 'nothus a um', but this translates to 'mark shadow' or 'shade' or 'spurious, not genuine'.

    The rest you can find on google...

    Its supposed to be a light-hearted quote. 'majorbloodnock' got it (http://www.sqlservercentral.com/Forums/Topic522997-263-1.aspx#bm523145) and was able to add a last bit, too. 😀

    We'll see if I can remember this correctly -

    si hoc legere scis nimium eruditionis habes

    ---------------------------------------------------------
    How best to post your question[/url]
    How to post performance problems[/url]
    Tally Table:What it is and how it replaces a loop[/url]

    "stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."

Viewing 15 posts - 76 through 90 (of 134 total)

You must be logged in to reply to this topic. Login to reply