Number of rows returned by different JOINs

  • Raghavendra Mudugal (7/3/2014)


    Mighty (7/3/2014)


    Definitely way too easy.

    Still easy, but if table B would have the values 1 and 2, then at least you could have explained something about the different join types.

    This should hold for some time... (except CROSS)

    cool

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Simple but witty - thank you, Abbas!

  • Totally agreed.

  • The 1st query results a cartesian product (6 rows) & only 1 answer starts with 6 rows, so no need to continue reading. This could have been more difficult if you just manuplated with the options (if you know what I mean ;-)).

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Hany Helmy (7/5/2014)


    The 1st query results a cartesian product (6 rows) & only 1 answer starts with 6 rows, so no need to continue reading. This could have been more difficult if you just manuplated with the options (if you know what I mean ;-)).

    +1

    Thanks

  • I looked at that and wondered what the catch was. But all the values are the same, so all the queries have to deliver the same result, and there's only one option that shows that, and the cross join has to deliver that, and only the same option has that, so the only catch is that it's so easy that people like me will suspect a catch.

    Despite that, 14% got it wrong - incomprehensible.

    Tom

  • Hi Abbas,

    i hope the correct answer for your question regarding the joins is 6,2,3,2,3(no.of columns) for each join,

    please reply me if i am wrong.

    Thanks & regards

    Balakrishna

  • Hi Abbas,

    i hope the correct answer for your question regarding the joins is 6,2,3,2,3(no.of columns) for each join,

    please reply me if i am wrong.:-)

    Thanks & regards

    Balakrishna:-)

  • balakrishnagoudp (7/12/2014)


    Hi Abbas,

    i hope the correct answer for your question regarding the joins is 6,2,3,2,3(no.of columns) for each join,

    please reply me if i am wrong.

    Thanks & regards

    Balakrishna

    That seems unlikely, since the question is "how many rows?", not "how many columns?".

    Tom

  • all the query will return 6 rows.

    But I remember, I have not included the cross join. May be the admin while approving have added it.

Viewing 10 posts - 16 through 24 (of 24 total)

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