Oracle trigger if inserting or updating a teenagers guide to dating' When Inserting'); ELSIF UPDATING THEN dbms_output.put_line(v Msg
The triggering event is either a INSERT, DELETE, or UPDATE command. The trigger can be either row-level or statement-level, where the former fires once for each row affected by the triggering statement and the latter fires once for the whole statement.
Hello Tom- my requirement is When a record is inserted into ERR table, a post-event trigger will fire updating the D field to accept sys date (3 columns has to update in my original requirement).
I've written the below code, however after the record is inserted it's not being updated with sys date in D rather I got the mutating error. SQL insert into err(x) values(2); insert into err(x) values(2) * ERROR at line 1: ORA-04091: table ERR is mutating, trigger/function may not see it ORA-06512: at "TRIG_2", line 3 ORA-04088: error during execution of trigger 'TRIG_2' SQL thank you very much for your help and suggestions.
The system checks for the violation of the constraints on actions that may cause a violation, and aborts the action accordingly.
Information on SQL constraints can be found in the textbook.
Search for oracle trigger if inserting or updating:
The WHEN clause or body of the trigger can check for the violation of certain conditions and signal an error accordingly using the Oracle built-in function RAISE_APPLICATION_ERROR.