会话二的update语句执行成功
2、select for update nowait
for update和for update nowait都会对查询到的当前结果集进行加锁,所不同的是,当有另外的会话在修改当前结果集中的数据...3、select for update wait
它也会对查询到的结果集进行加锁,select for update wait与select for update nowait不同的地方是,当有另外的会话对它的查询结果集中的某一行数据进行了加锁...没有进行commit操作,此时对test6和test8中的ID>3的数据行都进行了加锁,测试代码如下:
新建一个会话,执行以下语句:
select * from test6 for update skip...在不执行commit操作的情况,新建一个会话,执行一下语句:
select * from test6 for update skip locked
?...比对测试结果,发现在OF子句的作用下,oracle对同时满足where子句(设置要加锁的数据行)和OF子句(主要设置加锁的表)的数据行进行了加锁。