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 方式获取资源,或者超时失效

select for update [nowait]的更多相关文章

  1. select for update和select for update wait和select for update nowait的区别

    CREATE TABLE "TEST6" ( "ID" ), "NAME" ), "AGE" ,), "SEX ...

  2. select for update行锁

     select for update行锁 2008-05-26 15:15:37 分类: Oracle Select-For Update语句的语法与select语句相同,只是在select语句的后面 ...

  3. select * from salgrade for update和select * from salgrade for update nowait区别

    1,select * from salgrade for update session1 session2 SQL> delete salgrade where grade=1; 1 row d ...

  4. 【JAVA】FOR UPDATE 和 FOR UPDATE NOWAIT 区别 (转)

    1.for update 和 for update nowait 的区别:首先一点,如果只是select 的话,Oracle是不会加任何锁的,也就是Oracle对 select 读到的数据不会有任何限 ...

  5. Select For update语句浅析 (转)

    Select … for update语句是我们经常使用手工加锁语句.通常情况下,select语句是不会对数据加锁,妨碍影响其他的DML和DDL操作.同时,在多版本一致读机制的支持下,select语句 ...

  6. MySQL 使用SELECT ... FOR UPDATE 做事务写入前的确认(转)

    Select…For Update语句的语法与select语句相同,只是在select语句的后面加FOR UPDATE [NOWAIT]子句. 该语句用来锁定特定的行(如果有where子句,就是满足w ...

  7. [转]oracle for update和for update nowait的区别

    1概念小结:(针对以下引用区域内容) 1.1 普通select语句不加锁. 1.2 for update和for update nowait都试图将符合条件的数据加上行级锁.用于排斥其他针对这个表的写 ...

  8. Oracle 中 for update 和 for update nowait 的区别

    原文出处http://bijian1013.iteye.com/blog/1895412 一.for update 和 for update nowait 的区别 首先一点,如果只是select 的话 ...

  9. for update和for update nowait的区别和使用

    首先,for update 和for update nowait 是对操作的数据行进行加锁,在事务提交前防止其他操作对数据的修改. for update 和for update nowait主要区别在 ...

随机推荐

  1. Spring Boot 入门之消息中间件篇(五)

    原文地址:Spring Boot 入门之消息中间件篇(五) 博客地址:http://www.extlight.com 一.前言 在消息中间件中有 2 个重要的概念:消息代理和目的地.当消息发送者发送消 ...

  2. Linux SSH远程文件/目录 传输

    Linux SSH远程文件/目录传输命令scp 2010年08月6日 上午 | 作者:VPS侦探 相信各位VPSer在使用VPS时会经常在不同VPS间互相备份数据或者转移数据,大部分情况下VPS上都已 ...

  3. CentOS查看显卡及GPU相关信息

    lspci  | grep -i vga 这样就可以显示机器上的显卡信息,比如 [root@localhost conf]# lspci | grep -i vga01:00.0 VGA compat ...

  4. VS2017 Linux C++引用自定义的动态库

    前一篇博客讲了用系统库libpthread.so的例子,只需要在项目属性页的[C++->命令行参数]和[链接器->命令行参数]中加上对应参数(比如-pthread)即可,然后我试着引用自己 ...

  5. Go语言面组合式向对象编程基础总结

    转自:http://blog.csdn.net/yue7603835/article/details/44282823 Go语言的面向对象编程简单而干净,通过非侵入式接口模型,否定了C/C++ Jav ...

  6. asp.net webapi 自托管插件式服务

    webapi问世已久,稀里糊涂的人哪它都当mvc来使,毕竟已mvc使用级别的经验就可以应对webapi. webapi和mvc在asp.net5时代合体了,这告诉我们,其实 它俩还是有区别的,要不现在 ...

  7. Oracle11g 搭建单实例DataGuard (转载)

    原文:http://blog.itpub.net/29324876/viewspace-1246133/ 环境:主备库都为单实例并且数据库SID相同 OS:red hat 6.5 Oracle:11. ...

  8. 《Linux内核精髓:精通Linux内核必会的75个绝技》一HACK #14 虚拟存储子系统的调整

    HACK #14 虚拟存储子系统的调整 本节介绍如何使用/proc进行虚拟存储子系统的调整.虚拟空间存储方式在Linux上向应用程序分配内存时,是通过以页面为单位的虚拟存储方式进行的.采用虚拟存储方式 ...

  9. storm架构及原理

    storm 架构与原理 1 storm简介 1.1 storm是什么 如果只用一句话来描述 storm 是什么的话:分布式 && 实时 计算系统.按照作者 Nathan Marz 的说 ...

  10. 读取Excel里面的内容转为DataTable

    using System; using System.Collections.Generic; using System.Data; using System.Data.OleDb; using Sy ...