zno2

select for update [nowait]

The NOWAIT and WAIT clauses let you tell the database how to proceed if the SELECT statement attempts to lock a row that is locked by another user.

  • Specify NOWAIT to return control to you immediately if a lock exists.

  • Specify WAIT to instruct the database to wait integer seconds for the row to become available and then return control to you.

If you specify neither WAIT nor NOWAIT, then the database waits until the row is available and then returns the results of the SELECTstatement.

 

解除 lock 的方法:commit or rollback

可能出现的错误:ORA-00054: 资源正忙,但指定已NOWAIT 方式获取资源,或者超时失效

posted on 2016-08-05 18:03  zno2  阅读(139)  评论(0编辑  收藏  举报

导航