Executing a stored procedure inside BEGIN/END TRANSACTION

前端 未结 7 1099
谎友^
谎友^ 2020-12-13 06:28

If I create a Stored Procedure in SQL and call it (EXEC spStoredProcedure) within the BEGIN/END TRANSACTION, does this other stored procedure also fall into the

7条回答
  •  被撕碎了的回忆
    2020-12-13 06:51

    Yes, all nested stored procedure calls are included in the scope of the transaction. If you are using SQL Server 2005 or greater, you can use Try...Catch as well. Here is more detail on that.

提交回复
热议问题