Get the App
SLTechnology News&Howtos  ›  Database  › 

How to use autonomous transactions in oracle triggers

Shulou Source: shulou.com Published: 2022-05-31 17:45:22 10月04日 Update

Editor to share with you how to use autonomous transactions in oracle triggers. I hope you will get something after reading this article. Let's discuss it together.

Using autonomous transaction mode, you can rollback or commit in trigger.

Examples are as follows:

SQL codeCREATE OR REPLACE TRIGGER TRI_TRACE BEFORE INSERT OR DELETE OR UPDATE ON XXTABLE FOR EACH ROW DECLARE PRAGMA AUTONOMOUS_TRANSACTION;-declare autonomous transaction BEGIN IF UPDATING THEN. END IF;. IF: NEW.ID = 1001 THEN ROLLBACK;-- roll back the top … After reading this article, I believe you have a certain understanding of "how to use autonomous transactions in oracle triggers". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Tags: Transactions autonomy triggers articles examples done ways more knowledge industry information information channels channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL OPPO Reno Docker Shulou Technology macOS