views:

60

answers:

1

SELECT executed during the first command T1 is a transaction, in turn, DELETE command (at the time T2) is the first command transaction B. What will be the result of the SELECT statement at the time of T3 (a transaction)?

alt text

The SELECT statement in T3 will return a row (because Transaction B is not committed yet) ?

+2  A: 

Yes, it will, as the other transaction is not commited yet.

If you would try to do the same DELETE in Transaction A after the DELETE in Transaction B, then you would have to wait for the lock to be released, but a SELECT will work fine.

Peter Lang