Mike Byrd (6/21/2011)
Makes it even more interesting if you add following:
insert into @test-2 values ( NULL )
Answer is still 6.
Because aggregate functions ignore NULLs, right?
Good question today, thanks. I had it nailed on theory and then almost got it wrong by screwing up the math. 24 divided by 4 is NOT 8, duh. Tuesday morning brain, I guess.
NULL is not zero
NULL is not an empty string
NULL is the unknown