select * from emp where empno = 7369 for update of sal; 这条语句是不是意味着只对表中的7369 这一行的sal字段的数据进行了上锁,
是对整行加锁的,效果和select * from emp where empno = 7369 for update; 一样
哪位能解决这个问题??
...全文
2841打赏收藏
如何只对表的一个字段加锁
以为可以用select ... where For update of 表名.列名实现,但经测试 select * from emp where empno = 7369 for update of sal; 这条语句是不是意味着只对表中的7369 这一行的sal字段的数据进行了上锁, 是对整行加锁的,效果和select * from emp where empno = 7369 for update; 一样 哪位能解决这个问题??