In database instead of COUNT() method in SQL SELECT query statement we can use ROWCOUNT_BIG() after simple SQL SELECT query statement.ROWCOUNT_BIG() function operates like @@ROWCOUNT and returns the number of rows affected by the last statement executed.However, the return type of data type is bigint.
SELECT statement, this function returns the number of rows returned by the SELECT statement. INSERT, UPDATE, or DELETE statement, this function returns the number of rows affected by the data modification statement.
Examples – SELECT * FROM Table_Name
It returns total number of count of SQL Statement.
If the number of rows returns more than 2 billion, use ROWCOUNT_BIG.
Because it returns Bigint data type which can store larger range of numbers than the int data type.