The pragma is not legal in nested blocks: : Transaction « PL SQL « Oracle PL / SQL






The pragma is not legal in nested blocks:

 
SQL> BEGIN
  2    DECLARE
  3      PRAGMA AUTONOMOUS_TRANSACTION;
  4    BEGIN
  5      COMMIT;
  6    END;
  7  END;
  8  /
    PRAGMA AUTONOMOUS_TRANSACTION;
           *
ERROR at line 3:
ORA-06550: line 3, column 12:
PLS-00710: PRAGMA AUTONOMOUS_TRANSACTION cannot be specified here


SQL>
SQL>
SQL>

 








Related examples in the same category

1.Commit an insert statement in PL SQL
2.set transaction use rollback segment
3.The pragma is legal in top-level anonymous blocks:
4.The pragma is valid in both standalone and local subprograms.
5.The pragma is valid in a packaged procedure.
6.interaction between savepoints and autonomous transactions.
7.Calling an autonomous function from SQL.
8.Autonomous transactions.