尝试了一下多表查询的时候,发现不同的地方在于出现表连接的时候
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 xxx的区别和用法
最新推荐文章于 2021-11-03 20:53:51 发布
本文探讨了在多表查询中使用FOR UPDATE与FOR UPDATE OF的区别。通过具体示例说明了这两种方式如何锁定不同范围的数据记录。
1214

被折叠的 条评论
为什么被折叠?



