Home  >  Article  >  Database  >  sqlserver禁止managementstudio的自动提交

sqlserver禁止managementstudio的自动提交

WBOY
WBOYOriginal
2016-06-07 15:57:311148browse

自动提交事务默认management studio是自动提交事务,即一个语句就一个事务。 隐式事务打开Sql Server Managerment Studio,登陆到实例当中。Tools - OptionsQuery Execution - SQL Server - ANSI将SET IMPLICIT_TRANSACTIONS前打上勾这样,当一个事务结束,新

自动提交事务 默认management studio是自动提交事务,即一个语句就一个事务。
隐式事务 打开Sql Server Managerment Studio,登陆到实例当中。 Tools -> Options Query Execution -> SQL Server -> ANSI 将SET IMPLICIT_TRANSACTIONS前打上勾 这样,当一个事务结束,新的语句会自动开启一个新的事务。此为隐式事务。事务最终也是通过我们的commit或rollback来结束。
显式事务 begin transaction delete from erpdb.dbo.mtl_categories_b rollback transaction --commit transaction
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn