Oracle 锁

1. 行级锁
   select ... for update wait
   e.g: select * from table_name for update of col_name wait 10(s)

2. 表级锁

   lock table (table_name) in (share or share update or exclusive mode) nowait

   a. 共享模式
      e.g: lock table table_name in share mode;

   b. 共享更新模式
      e.g: lock table table_name in share update mode;

   c. 排他锁模式
      e.g: lock table table_name in exclusive mode;

你可能感兴趣的:(oracle,锁,行级锁,表级锁)