How many rows are returned from the query below?

  • Abrar Ahmad_

    SSCarpal Tunnel

    Points: 4104

    Aam-624390 (3/3/2010)


    Seems to be a lot missing assumptions. Each given answer can be correct given different starting conditions.

    [font="Verdana"]Sure; and That's why i lost one point.... for the first time 🙂

    😛 [/font]

  • david_wendelken

    SSCrazy

    Points: 2278

    ziangij (3/3/2010)


    i fail to understand what is the learning in this question. anybody plz. suggest...

    It is pointless to try to find the answer to the wrong question.

  • kagisobk

    Old Hand

    Points: 352

    I also failed to understand the logic beyond this question because if I try to fire this query

    WITH Users(UserID, UserName)

    AS( SELECT TOP 1 intUserID, strUserName FROM tblUsers)

    SELECT TOP 2 tblUsers.*, Users.* FROM tblUsers, Users

    it will give me an error because the table is not existing in my database

  • manik_anu

    SSCrazy

    Points: 2367

    This is act as a cross join. so 2*1 rows = 2 rows... if there is any where condition provided it acts as a normal join And we have to assume the tblUsers table is exists.....nice question.....Thanks...

    Manik

    ************

    Manik
    You cannot get to the top by sitting on your bottom.

  • NatureTech

    SSC Enthusiast

    Points: 120

    Could you please explain with some data as i did not get the concept.

  • matt.akers.1

    SSC Veteran

    Points: 211

    Assuming the original table has two records in it is a big thing here too. The answer is notably different when you only start with one record. I am generally against being clever with "non standard" or "non generally accepted" syntax for the sake of acadamia. In this case the natural join.

Viewing 6 posts - 106 through 111 (of 111 total)

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