Hello:
I'm trying to write a trigger which will allow me to delete from multiple records. I have two tables where the record for the same client_id needs to be deleted.
Is it possible to do this? I started writing some code and this is what I have so far:
create or replace trigger app_t1
before delete on <table1> ?? -
for each row
begin
delete from client where clientid = :new.clientid;
delete from key where pk = :newclientid;
end;
I'm stuck on the line where I have "before delete on" where I'm supposed to provide a table name. I can only use one table and I need to delete from two.
This trigger is supposed to be used within APEX. In APEX, fields are designated as :P1_clientid where P1 references page 1 of the application. Yet, :P1_clientid is set to the field clientid in the table.
So when I write my trigger, I'm not sure how I'm supposed to set my variables.
Can someone help?
I'm also going to post this into the APEX forum.
Thanks.