Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> use of :new and :old in triggers

use of :new and :old in triggers

From: Stefan Seeger <Stefan.Seeger_at_apertum.de>
Date: 1997/07/25
Message-ID: <01bc98d8$542bb640$024cd6c3@sciproxy>#1/1

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);

end;

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US