sql - SQL Server中的嵌套事务

标签 sql sql-server tsql transactions

sql server是否允许嵌套事务?
如果是这样,那么交易的优先级是什么?

最佳答案

从SQL Server的MSDN文档中获得。 Nesting Transactions :

Committing inner transactions is ignored by the SQL Server Database Engine. The transaction is either committed or rolled back based on the action taken at the end of the outermost transaction. If the outer transaction is committed, the inner nested transactions are also committed. If the outer transaction is rolled back, then all inner transactions are also rolled back, regardless of whether or not the inner transactions were individually committed.

关于sql - SQL Server中的嵌套事务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/851441/

相关文章:

sql - 根据月份获取最新日期值

sql - 从 TSQL 到 PL/SQL 的迁移工具?

sql - Postgres 错误 : null value in column "id" - during insert operation

sql - 获取从一对多关系 Firebird 加入的最后记录

sql - Postgresql:在分隔符的第一个实例之后提取子字符串

mysql - SQL Server 自动递增下一个 INSERT 查询

MySQL 表 UNION 问题

sql - T-SQL,计划作业中的多个更新

sql-server - 在 SELECT 语句中返回单独行中的列

mysql - 将旧数据库 (MYSQL) 导出到具有不同架构的不同数据库 (SQL Server)