Using Transactions
To consider several operations as members of the same transaction, it is necessary to establish the transaction boundaries by selecting the transaction starting and ending points.
You can consider three different types of transactions:
Auto commit transactions—SQL Server always starts a transaction whenever any statement needs to modify data. SQL Server automatically commits the transaction if the statement finishes its work successfully. However, if the statement produces any error, SQL Server will automatically roll back all changes produced by this incomplete statement. In this way, SQL Server automatically maintains data consistency for every statement that modifies data.
Explicit transactions—The programmer specifically ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access