• honza.mf (6/7/2011)


    DugyC (6/7/2011)


    honza.mf (6/7/2011)


    WayneS (6/6/2011)


    Actually, none of those choices are correct. You get back 50 random GUID values.

    1. NEWID() returns a random GUID (aka uniqueidentifier)

    2. Select statement has no order by clause, so the results are random.

    3. The GO 50 repeats that batch (since the last GO statement) 50 times (if in SSMS and the batch separator is set to "GO")

    The answer annotated as correct ("50") is not correct... the results are 50 random GUID values. "50" is not returned. Now, if it was a select count(*), that would be different.

    Is it so hard to add the missing count? Be empathic a little :w00t:

    The "correct" answer is least non-correct.

    I concur with Wayne, I eliminated your "least non-correct" answers as I knew, had the batch worked, it would return a list of guids... therefore I went for an error condition and got it wrong.

    Normally I would agree with you regarding being "picky", but here the ambiguity was too deep.

    The list of GUIDs was not in the list of possible answers.

    If you don't like to add count to the last query, just imagine some words like "GUIDs", "lines", or "items" after the numeric possibilities. And the answer is almost correct.

    Other idea: Try to write your own QotD (I did) and make it bulletproof (first time I was far away of that).

    Yeesh! Somethings got your cage rattled 😛

    I think I've made it perfectly clear that I'm on your side as much as I agree with Wayne... and I never slated the original post or the question, just explaining my confusion. That is all.

    Chill pill 😀

    _____________________________________________________________________
    [font="Comic Sans MS"]"The difficult tasks we do immediately, the impossible takes a little longer"[/font]