Pages

Men

rh

7/03/2012

COUNT_BIG Function in SQL SERVER 2008

COUNT_BIG Function in SQL SERVER 2008:-


Returns the number of items in a group. COUNT_BIG works like the COUNT function. The only difference between the two functions is their return values. COUNT_BIG always returns a bigint data type value. COUNT always returns an int data type value. May be followed by the Over Clause


Remarks :-

  • COUNT_BIG(*) returns the number of items in a group. This includes NULL values and duplicates.
  • COUNT_BIG(ALL expression) evaluates expression for each row in a group and returns the number of nonnull values.
  • COUNT_BIG(DISTINCT expression) evaluates expression for each row in a group and returns the number of unique, nonnull values.
Example:-



No comments :

Post a Comment