Moh*_*yan 0 oracle oracle-11g transaction isolation-level plsql-developer
我想在 Oracle 11g 中运行这个 SQL:
declare a number;
begin
select count(*) into a from item w where w.Item_num='MOH601' ;
dbms_output.put_line(a);
end ;
Run Code Online (Sandbox Code Playgroud)
如何使用隔离可序列化运行此查询?正如我之前所了解的,Oracle 会w.Item_num='MOH601'
在使用 Serializable 时锁定行。
更改会话:
declare a number;
begin
EXECUTE IMMEDIATE 'ALTER SESSION SET ISOLATION_LEVEL SERIALIZABLE';
select count(*) into a from item w where w.Item_num='MOH601' ;
dbms_output.put_line(a);
end ;
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
798 次 |
最近记录: |