Why count(0) and count(1)——What does 0 and 1 mean here?And what's the MOST DIFFERENCE BETWEEN the two statements?
There is no difference.
you must see this
select count(0) --0 means expression only
select count(1) --1 means expression only
---both above results show output one
--becuase count function require
--as well as check this
select COUNT(*)
--this will also return value 1 becuase count function is not used in select query
yrb.yogi
Star
14460 Points
2402 Posts
Re: What's the differences among Count(0), Count(1) and Count(SomeField)
May 14, 2012 07:19 AM|LINK
There is no difference.
you must see this
.Net All About