Reading Time: 4 minutesHere’s the deal with nested transactions: There really isn’t a concept of “nested transactions” in SQL Server. That is, an inner transaction that can operate independently of an outer transaction. Let’s work through an example using the content from an Orders table: The following code is a very simple example Continue Reading
Transactions
SQL Server Implicit Transaction Mode: Proceed with Caution!
Reading Time: 4 minutesImplicit transactions are a strange thing in SQL Server. It’s very important to understand how transactions work in Microsoft SQL Server and to understand the different tools available to us when writing transactions. One such tool is the “IMPLICIT_TRANSACTIONS” mode. But beware. Enabling this feature can have unforeseen consequences! In Continue Reading
SQL Server ROLLBACK: Everything you need to know
Reading Time: 9 minutesIn SQL Server, there are plenty of instances where you might want to undo a statement that was just ran. Maybe you wrote an UPDATE statement that modified too many rows, or maybe an INSERT statement wasn’t quite right. In these instances, it is great when the work is performed within a Continue Reading
Are you making this ROLLBACK mistake in your stored procedures?
Reading Time: 9 minutesIf you read my post about the 6 rules you should know about SQL Server transactions, you should know there is one rule that can be a bit tricky. This rule centers around the idea of doing a ROLLBACK within a stored procedure. The rule is this: When you leave Continue Reading
SQL Server Transactions: Do you understand these 6 rules?
Reading Time: 8 minutesWhen I was first learning about transactions in Microsoft SQL Server, there were a few simple rules I had to learn the hard way. I found myself in a great amount of confusion because I didn’t know these basic rules about transactions. If I can save you from making those Continue Reading
SQL Server Transactions: An Introduction for Beginners
Reading Time: 12 minutesIf you plan on working with SQL Server for more than 5 minutes, you should expect to encounter something called a transaction very early in your career. Understanding SQL transactions is the first step in writing well-performing SQL solutions that are less likely to cause data corruption. Transactions are definitely Continue Reading