Create a trigger named trigger_contact_af_update that is triggered whenever the contact table is updated. This trigger will insert the org_name and action into the table contact_log_history after the update of contact details. The action name in the affected log table contact_log_history is 'After_Update_Contact'.
Hints:
- Trigger name : trigger_contact_af_update
- Table name : contact_log_history
- Field names : org_name,action
- Action : 'After_Update_Contact'.
The table structure of contact_log_history is as follows:
org_name Varchar(30)
action Varchar(30)
I wrote the below trigger but no error or trigger created.
CREATE OR REPLACE TRIGGER trigger_contact_af_update AFTER UPDATE
ON contact_log_history FOR EACH ROW
DECLARE
org_name VARCHAR(30);
action VARCHAR(30);
BEGIN
if (:new.action == 'After_Update_Contact')
then
INSERT INTO contact_log_history (org_name, action)
values (:new.org_name, :new:action);
end if ;
END;
contacttable but for some reason you have built the trigger oncontact_log_history. You might get more success if you built it on the right table. - APC==) with single(=) for:new.action == 'After_Update_Contact'- Barbaros Özhan