How can I get the number of records affected by a stored procedure?

前端 未结 6 1997
轮回少年
轮回少年 2020-12-04 20:32

For INSERT, UPDATE and DELETE SQL statements executed directly against the database, most database providers return the count of rows

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 21:21

    For Microsoft SQL Server you can return the @@ROWCOUNT variable to return the number of rows affected by the last statement in the stored procedure.

提交回复
热议问题