使用指南

oracle单行锁定

当session1使用forupdate时,要求session2获取表中的其他记录,select*fromtwhereidin(selectidfrom (selectidfromtorderbydbms_random.random)  whererownum<20)forupdateskiplocked;

2026-07-30 · 9 次阅读

  当session1使用for update时,要求session2获取表中的其他记录,

  select * from t where id in (select id from  (select id from t order by dbms_random.random)   where rownum < 20 )

  for update skip locked;

关键词标签:oracle单行锁定

YOU MAY ALSO LIKE

更多应用推荐

浏览应用库