Take the 2-minute tour ×  I am currently working with
transactions and getting confused. These transaction are created
at the data access layer and not in the stored procedures of the
database (SQL Server 2008). I understand the normal working of
Isolation Levels set for a transaction. I am unable to
comprehend what should happen in the following scenario.    1.
Initiate a transaction   2. Select Employee with ID=1.   3.
Update Employee with ID=1.   4. Commit  There are multiple
threads doing the same thing but different ID. But there might
be a case where in two threads look up the same ID. Lets call
them Thread A and B. The above steps progress in the following
manner with respect to the two threads. The Isolation Level is
set to Repeatable Read.  A1. Initiate a transaction A2. Select
Employee with ID=1. B1. Initiate a transaction B2. Select
Employee with ID=1. A3. Update Employee with ID=1. A4. Commit
B3. Update Employee with ID=1. B4. Commit  What I really want to
achieve from the transaction is that when