首页 > 其他 > 详细

游标更新 for update 与for update of 字段的区别

时间:2015-12-30 17:16:57      阅读:341      评论:0      收藏:0      [点我收藏+]

尝试了一下,发现不同的地方在于出现表连接的时候
ex: select a.col1 from a, b where a.col1 = b.col2 and ... for udpate 
这个时候锁住了a,b两个表中满足条件的记录,而
select a.col1 from a, b where a.col1 = b.col2 and ... for update of a.col1
仅仅锁住了a表中满足条件的记录

所以for update 和for update of 还是有区别的

 

没有标关联的时候一样。

游标更新 for update 与for update of 字段的区别

原文:http://www.cnblogs.com/ddwy/p/5089348.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!