Executing a stored procedure inside BEGIN/END TRANSACTION

前端 未结 7 1074
谎友^
谎友^ 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:57

    I believe in MS SQL Server the stored procedure execution would happen within the transaction, but be very careful with this. If you have nested transactions (ie, transaction outside of the stored procedure and a different transaction inside the stored procedure), a rollback will affect ALL of the transactions, not just the nearest enclosing transaction.

    0 讨论(0)
提交回复
热议问题