abdeen-ahmad
3/3/2016 - 6:43 PM

Triiger for Backup Table

Triiger for Backup Table

CREATE OR REPLACE TRIGGER copy_loaddata
After INSERT
   ON emp
    FOR EACH ROW 

DECLARE
   -- variable declarations

BEGIN
   Insert into emp_copy values (:new.EMPNO,:new.ename,:new.v3,:new.v4);
   DBMS_OUTPUT.PUT_LINE('Record successfully inserted into emp_backup table');

EXCEPTION
   WHEN no_data_found then 
   DBMS_OUTPUT.PUT_LINE('ERROR');

END;