Re: trigger question

  • From: Vladimir Begun <Vladimir.Begun@xxxxxxxxxx>
  • To: Mark.Bobak@xxxxxxxxxxxxxxx, oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 23 Nov 2004 20:26:52 -0800

Beware: SQL statements are reparsed (insert in this case) when they
are present in trigger's code. packages, functions, procedures would
help.
-- 
Vladimir Begun
The statements and opinions expressed here are my own and
do not necessarily represent those of Oracle Corporation.

Bobak, Mark wrote:
> create or replace trigger back_up_the_data
> before update on data_table
> for each row
> begin
>   insert into backup_table values(:old.col_a,:old.col_b,:old.col_c,...);
> end;
> /
> 
> That ought to do it.....
> 
> Whoops, just saw your updated mail....in that case, try:
> create or replace trigger make_a_copy
> before insert on data_table
> for each row
> begin
>   insert into copy_table values(:new.col_a,:new.col_b,:new.col_c,...);
> end;
> /
> 
> Try that,
> 
> -Mark

--
//www.freelists.org/webpage/oracle-l

Other related posts: