PLSQL中有下面这么一段SQL文,在oracle 10g中能编译成功并运行,但移到11g环境中后,连编译都不通过了。
Select field1,...,fieldN
From table1 t1
inner join table2 t2
on t1.KeyField1 = t2.KeyField1
where t1.keyCondition = ConditionValue1
Order by t1.OrderField
FOR UPDATE OF t2.KeyField调查了好久也没搞明白,貌似发现11g中不支持FOR UPDATE OF !???为什么呢?请教一下,怎么在11g中能实现 多表查询中只锁定某一个表!!谢谢了。Orale 11g行锁定单个表
Select field1,...,fieldN
From table1 t1
inner join table2 t2
on t1.KeyField1 = t2.KeyField1
where t1.keyCondition = ConditionValue1
Order by t1.OrderField
FOR UPDATE OF t2.KeyField调查了好久也没搞明白,貌似发现11g中不支持FOR UPDATE OF !???为什么呢?请教一下,怎么在11g中能实现 多表查询中只锁定某一个表!!谢谢了。Orale 11g行锁定单个表
你看下是不是其他的原因报错
到11g就over了
完整的如下:
CURSOR CUR_1 IS
Select field1,...,fieldN
From table1 t1
inner join table2 t2
on t1.KeyField1 = t2.KeyField1
where t1.keyCondition = ConditionValue1
Order by t1.OrderField
FOR UPDATE OF t2.KeyField;难道是因为在cursor里的缘故?