Chris Harshman (3/19/2009)
Ben Leighton (3/19/2009)
this question is flawed...
if the SET READ_COMMITTED_SNAPSHOT is set to on for the database you are using then the query will return 1 and 2...
I'm being picky here I admit...
I don't think you're being picky at all, I'm sure many people are using row versioning with the READ_COMMITTED_SNAPSHOT ON setting.
I agree, he certainly isn't being picky. :-)
And that's not the only flaw in the question and its answer.
The answer stated is WRONG even if read_committed_snapshot is off. The correct answer is the one I gave: "none of the above", because the query is NOT running; it is blocked from running by a lock.
So there are two possible correct answers depending on the sate of read_committed_snapshot, and the poser of the question managed to select neither of them as the correct answer. Amazing.