Counting the number of rows returned by stored procedure

前端 未结 7 1732
礼貌的吻别
礼貌的吻别 2021-01-03 23:11

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.

7条回答
  •  难免孤独
    2021-01-03 23:41

    Create procedure procedurename
    AS
    Begin
    
        Select * from Table --if you want where condition write here
    
    End
    
    Exec Procedurename
    
    Select @@rowcount
    

提交回复
热议问题