How many rows are returned from the query below?

  • 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]

  • 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.

  • 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

  • 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.

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

  • 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 110 (of 110 total)

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