Monday, January 30, 2012

Count millions of records

COUNT_BIG() :

It works like a count function, difference is that count returns int value while COUNT_BIG() returns bigint.
while counting bulk of records at that time use count_big().

COUNT_BIG ( { [ ALL | DISTINCT ] expression } | * )