首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > IBM DB2 >

exists中加入with ur为什么报错呢,该如何解决

2012-02-25 
exists中加入with ur为什么报错呢if exists(select 1 from a where ... with ur)then....end if红字部分

exists中加入with ur为什么报错呢
if exists(select 1 from a where ... with ur)then
....
end if;

红字部分报错,为什么呢

[解决办法]
with UR 可能只能加在整个语句的最后,它不是为一个 SQL 子查询增加的说明而是整个执行的过程。
因为 with UR 描述的事务隔离作用于整个连接,至于作用某个表的 select ... for update 不清楚怎么表达。

热点排行