Fire the trigger after commit

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • walldm48
    New Member
    • Oct 2022
    • 1

    Fire the trigger after commit

    Hi,i'm writing sql trigger that updates some columns in table. I have to write that this trigger fires only after commit. I read some articles about this topic but in the most it is said to use procedure. But I have to do it with trigger.

    CREATE OR REPLACE TRIGGER tr_reset_er_enc ours
    AFTER INSERT OR UPDATE ON T
    FOR EACH ROW
    BEGIN
    IF (:NEW.T.var1)=0
    THEN UPDATE T
    SET var1=NULL
    END IF;
    END;
  • pritikumari
    Banned
    New Member
    • Jan 2023
    • 23

    #2
    A trigger is fired based on a triggering statement, which specifies: The SQL statement or the system event,
    database event, or DDL event that fires the trigger body.
    The options include DELETE , INSERT , and UPDATE .
    One, two, or all three of these options can be included in the triggering statement specification.
    You can take Oracle Course In Noida.

    Comment

    Working...