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
NOWAITto return control to you immediately if a lock exists.Specify
WAITto instruct the database to waitintegerseconds 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]的更多相关文章
- select for update和select for update wait和select for update nowait的区别
CREATE TABLE "TEST6" ( "ID" ), "NAME" ), "AGE" ,), "SEX ...
- select for update行锁
select for update行锁 2008-05-26 15:15:37 分类: Oracle Select-For Update语句的语法与select语句相同,只是在select语句的后面 ...
- 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 ...
- 【JAVA】FOR UPDATE 和 FOR UPDATE NOWAIT 区别 (转)
1.for update 和 for update nowait 的区别:首先一点,如果只是select 的话,Oracle是不会加任何锁的,也就是Oracle对 select 读到的数据不会有任何限 ...
- Select For update语句浅析 (转)
Select … for update语句是我们经常使用手工加锁语句.通常情况下,select语句是不会对数据加锁,妨碍影响其他的DML和DDL操作.同时,在多版本一致读机制的支持下,select语句 ...
- MySQL 使用SELECT ... FOR UPDATE 做事务写入前的确认(转)
Select…For Update语句的语法与select语句相同,只是在select语句的后面加FOR UPDATE [NOWAIT]子句. 该语句用来锁定特定的行(如果有where子句,就是满足w ...
- [转]oracle for update和for update nowait的区别
1概念小结:(针对以下引用区域内容) 1.1 普通select语句不加锁. 1.2 for update和for update nowait都试图将符合条件的数据加上行级锁.用于排斥其他针对这个表的写 ...
- Oracle 中 for update 和 for update nowait 的区别
原文出处http://bijian1013.iteye.com/blog/1895412 一.for update 和 for update nowait 的区别 首先一点,如果只是select 的话 ...
- for update和for update nowait的区别和使用
首先,for update 和for update nowait 是对操作的数据行进行加锁,在事务提交前防止其他操作对数据的修改. for update 和for update nowait主要区别在 ...
随机推荐
- FastAdmin 环境变量 env 配置
FastAdmin 环境变量 env 配置 目前 FastAdmin 支持环境变量 env 配置. 目前支持以下环境变量 app.debug app.trace database.type datab ...
- WebHttpBinding.ReaderQuotas 无法设置或者无法点出来
项目需要引用System.Runtime.Serialization.dll 才能设置各项值: binding.ReaderQuotas.MaxDepth = ; binding.ReaderQuot ...
- C#两个日期范围内的间隔
http://www.cnblogs.com/love_study/archive/2011/04/02/2003045.html 引用地址 1 /// <summary> /// 计算日 ...
- mongodb与SQL常见语句对照
inert into users value(3,5) db.users.insert({a:3,b:5}) select a,b from users db.users.find({}, { ...
- mysql主从延时处理方法
mysql主从延时处理方法 1.今天做数据迁移,4个库总共60G数据左右吧,迁移成功后,发现从库延时在不断的上升,查看从库库表,部分表还没有同步过去 2.网上查询了一些文章,增加一下配置可以解决: # ...
- canvas设置渐变
canvas设置渐变 方法 createLinearGradient(x1, y1, x2, y2) 线性渐变 createRadialGradient(x1, y1, r1, x2, y2, r2) ...
- PHP图片加水印文字及图片合成缩放
<?php //图片添加文字水印 /*$bigImgPath = 'background.png'; $img = imagecreatefromstring(file_get_contents ...
- ES6系列_7之箭头函数和扩展
1.默认值 在ES6中给我们增加了默认值的操作相关代码如下: function add(a,b=1){ return a+b; } console.log(add(1)); 可以看到现在只需要传递一个 ...
- Oracle Tip: Choosing an efficient design for Boolean column values
Takeaway: When designing a database table structure, it's important to choose an efficient strategy ...
- 【HTTP请求】、详解
一.协议介绍 HTTP(HyperText Transfer Protocol,超文本传输协议)是一套计算机通过网络进行通信的规则,使HTTP客户端能够从HTTP服务器端请求到信息和服务,目前的版本号 ...