Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Creating Triggers
On Wed, 07 Oct 1998 17:37:15 -0700, Nimat Haque <nha_at_ece2.engr.ucf.edu> wrote:
>Hi,
>I have two tables table1 and table2. I am trying to create a trigger
>that will do the following work:
>
>Whenever a new row is inserted to table1, one field (for example SSN)
>value will be taken from the table and inserted to table2.
>
>Is there any example of creating the trigger?
>
try...
create or replace
trigger ai_fer_table1
after insert on table1
for each row
begin
insert into table2 ( col1 ) values ( :new.ssn );
end;
/
chris.
>Thanks-
>Nimat
Received on Thu Oct 08 1998 - 00:00:00 CDT