DugyC (6/7/2011) honza.mf (6/7/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
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).
See, understand, learn, try, use efficient