Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> use of :new and :old in triggers
Hello!
I have a question about using the :new and :old types in a database
trigger:
Is there any way to copy the contents of :new or :old in a ROWTYPE variable
without naming every column?
Example:
I wrote a trigger:
create trigger test
after insert or update of emp
for each row
declare
new_row emp%rowtype;
begin
new_row.id = :new.id; new_row.name = :new.name; (and so on...) procedure_name( new_row);
Now:
Is there a solution to pass the :new structure, which must be a type of
emp%rowtype, to the procedure like:
procedure_name( :new)
or
procedure_name( new)
or
new_row := new;
procedure_name( new_row);
or
a loop, which copies the columns of the :new to the new_row variable
?
Thanks for your help in advance!
Bye,
Stefan
Received on Fri Jul 25 1997 - 00:00:00 CDT