In our Query Life when we need to get the Count of any Record in our Database Mostly we Use the COUNT() Aggregate Function the
Question Now SQL Server Have another Aggregate Function COUNT_BIG() i asked my Self SQL Server Team Created this Function Whiteout any bin fits ……….. The answer is No . COUNT() and COUNT_BIG() it’s the Same Aggregate Function in the Use The Main Different between the two Aggregate Function it :
Count Aggregate Function Return Int data type value .
COUNT_BIG() Aggregate Function Return BigInt data type value .
So if you Have Millions Record in your table and you need to Return the Count of this Record when you use the Count() Function it will Return Error but the Count_Big() Function it will Work with you Simply in this Case .
Count() Aggregate Function :
Count_Big Aggregate Function :