Articles → SQL SERVER → Autocommit Transactions In SQL Server
Autocommit Transactions In SQL Server
What Are Auto-Commit Transactions?
Enable Auto-Commit Mode
SET IMPLICIT_TRANSACTIONS OFF
Prerequisite
Case 1: When T-SQL Statement Contains Compile Time Error
Set identity_insert TestTable On
Insert into [dbo].[TestTable] values(1,'Test1')
Insert into [dbo].[TestTable] values(1,'Test2')
Set identity_insert TestTable Off
Case 2: Invalid Object Name (Or Other Run Time Error)
Set identity_insert TestTable On
Insert into [dbo].[TestTable] (Id, Name) values(1,'Test1')
Insert into [dbo].[TestTable1] values(2,'Test2')
Set identity_insert TestTable Off