The pragma is valid in both standalone and local subprograms. : Transaction « PL SQL « Oracle PL / SQL






The pragma is valid in both standalone and local subprograms.

 
SQL>
SQL> CREATE OR REPLACE PROCEDURE Auto1 AS
  2    PRAGMA AUTONOMOUS_TRANSACTION;
  3
  4    PROCEDURE Local IS
  5      PRAGMA AUTONOMOUS_TRANSACTION;
  6    BEGIN
  7      ROLLBACK;
  8    END Local;
  9  BEGIN
 10    Local;
 11    COMMIT;
 12  END Auto1;
 13  /

Procedure created.

SQL> show errors
No errors.
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 not legal in nested blocks:
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.