开发者

Using Transactions in Oracle

开发者 https://www.devze.com 2022-12-19 07:39 出处:网络
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 statem

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号