Autonomous Transactions, Tune SQL Developer, sql default value if no row is returned

Autonomous Transactions

Rating: 4.60/5. From 15 votes.
Please wait...
Werbung / Advertisements

PL/SQL normally treads the whole modification as a single transaction. If you want to have some part of the code as seperate transaction, you can use the functionallity of autonomous transactions. The statement PRAGMA AUTONOMOUS_TRANSACTION has to be part of the declarative section. Cause the transaction is seperate you have to seperate specify a COMMIT and ROLLBACK.

DECLARE
   PRAGMA AUTONOMOUS_TRANSACTION; 
BEGIN
   -- Code goes here
END;

Check also the full SQL Guide with lots of useful examples.

Werbung / Advertisements
Werbung / Advertisements
Rating: 4.60/5. From 15 votes.
Please wait...
Werbung / Advertisements