February 8, 2018 at 11:20 pm
Comments posted to this topic are about the item Basic COUNTs 4
February 9, 2018 at 6:10 am
nice question... thanks
Manik
You cannot get to the top by sitting on your bottom.
February 9, 2018 at 8:32 am
Thanks for this question! I recently re-learned this info, and the way I remembered it (I know it's probably a bad mnemonic but it works for me) is: "COUNT (ALL col) does not COUNT ALL" -meaning it excludes NULLs.
- webrunner
-------------------
A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
February 11, 2018 at 9:36 pm
Interesting....
thanks for the question, Steve
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
February 12, 2018 at 3:00 pm
Interesting question. "The ALL will be applied to all values, with the NULL eliminated" may be incorrect. I tried running the same query without COUNT() and found NULL value in the result set.
SELECT
ALL tc.varcharcol
FROM dbo.TheCounts AS tc
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply