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

Autonomous Transactions

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

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.

Advertisements

Als Amazon-Partner verdiene ich an qualifizierten Verkäufen!
Rating: 4.60/5. From 15 votes.
Please wait...
Advertisements
Laptop

Leave a comment

Your email address will not be published. Required fields are marked *