Pl sql if inserting updating

CREATE or REPLACE TRIGGER emp_after_update AFTER UPDATE OF empid ON emp FOR EACH ROW DECLARE BEGIN update emp_backup set empid = :new.empid where empid = :old.empid; DBMS_OUTPUT.PUT_LINE('empid successfully updated into emp_backup table'); END; The above trigger named ’emp_after_update’ will be initiated whenever ’empid’ column in ’emp’ table gets updated.PUT_LINE('Record successfully inserted into emp_backup table'); END; Second Problem: We want o update a record in the ’emp_backup’ table if a corresponding record is updated in the ’emp’ table.

If a triggering statement omits a column list, the trigger is fired when any column of the associated table is updated.In this chapter, we will discuss Triggers in PL/SQL.Triggers are stored programs, which are automatically executed or fired when some events occur.Triggers can be: Trigger names must be unique with respect to other triggers in the same schema.Trigger names do not need to be unique with respect to other schema objects, such as tables, views, and procedures.

Search for pl sql if inserting updating:

pl sql if inserting updating-20pl sql if inserting updating-11

Leave a Reply

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

One thought on “pl sql if inserting updating”