ORACLE EXECUTE IMMEDIATE 'DML' 不能自动提交COMMIT 'DDL'触发C

来源:转载


测试数据如下所示

CREATE TABLE T1(ID NUMBER,NAME VARCHAR2(10));BEGINEXECUTE IMMEDIATE 'INSERT INTO T1(ID,NAME) VALUES(5,''TEST'')';END;/SELECT LOCKED_MODE FROM V$LOCKED_OBJECT;----------------------------------------------LOCKED_MODE3------------------------------------------------------------------------BEGINEXECUTE IMMEDIATE 'INSERT INTO T1(ID,NAME) VALUES(5,''TEST'')';EXECUTE IMMEDIATE 'CREATE TABLE T2(ID NUMBER,NAME VARCHAR2(10))';END;/SELECT LOCKED_MODE FROM V$LOCKED_OBJECT;--无数据------------------------------------------------------------------------BEGINEXECUTE IMMEDIATE 'INSERT INTO T1(ID,NAME) VALUES(5,''TEST'')';EXECUTE IMMEDIATE 'CREATE INDEX T1_ID ON T1(ID)';END;/SELECT LOCKED_MODE FROM V$LOCKED_OBJECT;--无数据








分享给朋友:
您可能感兴趣的文章:
随机阅读: