Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: trigger question
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:Received on Wed Nov 24 2004 - 00:27:49 CST
> 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
-- http://www.freelists.org/webpage/oracle-l
![]() |
![]() |