Start Updating inside an oracle

Updating inside an oracle

SQL ID FIRST_NAME LAST_NAME START_DAT END_DATE SALARY CITY DESCRIPTION ---- ---------- ---------- --------- --------- ---------- ---------- --------------- 01 Jason Martin 25-JUL-96 25-JUL-06 2469.12 Toronto Programmer 02 Alison Mathews 21-MAR-76 21-FEB-86 13323.56 Vancouver Tester 03 James Smith 12-DEC-78 15-MAR-90 13089.56 Vancouver Tester 04 Celia Rice 24-OCT-82 21-APR-99 4689.56 Vancouver Manager 05 Robert Black 15-JAN-84 08-AUG-98 4669.56 Vancouver Tester 06 Linda Green 30-JUL-87 04-JAN-96 8645.56 New York Tester 07 David Larry 31-DEC-90 12-FEB-98 15795.56 New York Manager 08 James Cat 17-SEP-96 15-APR-02 2465.56 Vancouver Tester 8 rows selected.

Now before updating ’empid’ column in ’emp’ table see the ’emp’ and ’emp_backup’ table records.

CREATE or REPLACE TRIGGER emp_after_insert AFTER INSERT ON emp FOR EACH ROW DECLARE BEGIN insert into emp_backup values (:new.empid, :new.fname, :new.lname); DBMS_OUTPUT.

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.

Oracle announced on 24 September 2014 Oracle Open Stack for Oracle Linux distribution which allows users to control Oracle Linux and Oracle VM through Open Stack in production environments.