Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> One trigger operating on multipe tables .. possible ??
Hello all !
Thanks to You all for asking/answering and making this one of the best groups on the net for an Oracle newbie.
My question is: How do I get my "primary_key_insert_trigger" to work on all the tables in my dB ?
Here's my trigger:
(I have a sequence named insert_pk)
CREATE OR REPLACE TRIGGER trigger_pk
BEFORE INSERT ON table_a, table_b, table_c -- and so on .... REFERENCING NEW AS n FOR EACH ROW DECLARE new_key INTEGER;
:n.pk_field_on_table := new_key;
END;
As it is for now I can only get this to work on table_a. Do I have to create
this trigger for every table ?
thanks for any help !!
-jh
NORWAY
Received on Wed Nov 25 1998 - 00:00:00 CST