Reputation: 1
Is it possible to create a Trigger based on the last update date of different views? The one that triggers inserting entire employee and dept records in new table when last_update_dat
e changed/updated?
ex views:
CREATE OR REPLACE FORCE VIEW "EMPLOYEE_V" AS
SELECT employee_id
,employee_first_name
,employee_last_name
,emp_creation_date
,emp_last_update_date
FROM employees;
CREATE OR REPLACE FORCE VIEW "DEPARTMENT_V" AS
SELECT department_id
,department_name
,dep_creation_date
,dep_last_update_date
FROM department_id;
I know that this will require 1 trigger which will apply to both tables. But is there an alternative way to avoid several updates / update of records when the trigger in both tables have been fired?
Any help will be appreciated. Thanks :)
Upvotes: 0
Views: 152
Reputation: 17
One trigger can't be created on multiple tables. You need to create two different triggers for each underlying tables. Thanks..
Upvotes: 1