COUNT_BIG() is for counting big range TIP #50


Problem:– How to count large number of rows for specific condition ?


Suppose you have a large table which having more than millions of records and you want to count no of rows for specific condition  which itself contain more than 100 millions records.

Now in this case when we use COUNT function then we will get arithmetic overflow error message.

Now in such situation we have another function which can count this big ranges specially numeric data types.

The use of this is similar as COUNT function

For example you have to write


I hope it may help you some time Smile

Thanks & Enjoy

RJ !!!

Leave a Reply

Your email address will not be published. Required fields are marked *