xybrek xybrek - 2 months ago 9
SQL Question

Counting the number of rows returned by stored procedure

How do I count the number of rows a stored procedure would return the fastest way. Stored procedure returns rows around 100K to 1M records.

Answer

Select @@rowcount:

SELECT @@ROWCOUNT;

After executing the stored procedure.