The pragma is legal in top-level anonymous blocks: : Transaction « PL SQL « Oracle PL / SQL






The pragma is legal in top-level anonymous blocks:

 
SQL> DECLARE
  2    PRAGMA AUTONOMOUS_TRANSACTION;
  3  BEGIN
  4    COMMIT;
  5  END;
  6  /

PL/SQL procedure successfully completed.

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 not legal in nested 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.