Using Transactions in Oracle
SELECT
executed during the first command T1 is a transaction, in turn, DELETE
comma开发者_运维知识库nd (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) ?
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.
精彩评论