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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: trigger question

Re: trigger question

From: Vladimir Begun <Vladimir.Begun_at_oracle.com>
Date: Tue, 23 Nov 2004 20:26:52 -0800
Message-ID: <41A40D8C.5000107@oracle.com>


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
-- http://www.freelists.org/webpage/oracle-l
Received on Wed Nov 24 2004 - 00:27:49 CST

Original text of this message

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