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

it2022-05-06  1

尝试了一下,发现不同的地方在于出现表连接的时候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 还是有区别的

 

没有标关联的时候一样。

转载于:https://www.cnblogs.com/ddwy/p/5089348.html

相关资源:数据结构—成绩单生成器

最新回复(0)