Posted by Nick Chan on 10/17/07 07:08
hello guys, need help, i;m a bit confused about transactions after
reading some articles about locking/snapshot
let's stay i have this scenario
-----------------------------------------------------------------------------------
begin Tran 1 |
select Max Id = 5 |
set @a = MaxId + 1 = 6 |
insert into t values(@a) |
-----------------------------------------------------------------------------------
| begin Tran 2
| select max Id = XX
| set @a = maxId + 1 = ?
| insert and commit tran
2
-------------------------------------------------------------------------------------
commit tran 1 |
------------------------------------------------------------------------------------
what will XX be ? I thought transactions run in queues, but i saw
illustrations like the above
Navigation:
[Reply to this message]
|