DML的行锁定
我知道,如果是DML语句的情况,则在修改的行上获得了行锁,但是我在下面的语句中感到困惑,此Oracle Doc :
包含DML语句的交易不需要行锁 在子查询或隐式查询选择的任何行上。
在以下示例更新语句中,在 括号是一个子查询,>而a> 5条款是一个 隐式查询:
更新t设置x =(从t2中选择y,其中t2.z = tz)其中a> 5;
我的理解是,将对所有行获取锁定,其中a> 5
,但本文似乎是相反的。
甲骨文专家可以解释一下。
I know that in case of DML statement row lock is acquired on the rows which are modified, but I am confused below of below statement from this Oracle doc:
A transaction that contains a DML statement does not require row locks
on any rows selected by a subquery or an implicit query.In the following sample UPDATE statement, the SELECT statement in
parentheses is a subquery, > whereas the WHERE a > 5 clause is an
implicit query:
UPDATE t SET x = ( SELECT y FROM t2 WHERE t2.z = t.z ) WHERE a > 5;
My understanding is that lock will be acquired for all rows WHERE a > 5
but this article seems to be saying contrary.
Could an Oracle expert please explain this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论