Tony
Tony

Reputation: 12715

Using Transactions in Oracle

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 http://img682.imageshack.us/img682/3382/sqlm.png

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

Upvotes: 2

Views: 184

Answers (1)

Peter Lang
Peter Lang

Reputation: 55624

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.

Upvotes: 2

Related Questions