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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Create trigger

Re: Create trigger

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Sat, 19 Jun 1999 18:54:00 GMT
Message-ID: <376be71b.28053839@newshost.us.oracle.com>


A copy of this was sent to Robert Brown <rob_99_at_my-deja.com> (if that email address didn't require changing) On Sat, 19 Jun 1999 15:34:34 GMT, you wrote:

>Hi,
>
>Sybase user here. Just hoping someone can translate some syntax for
>me. In Sybase you can create a trigger with the following syntax:
>
>create trigger trigger_name
>on source_table
>for insert as
>begin
>insert into destination_table
>select * from inserted
>end
>go
>

create or replace trigger trigger_name
after insert on source_table
for each row
begin

   insert into destionation_table ( c1, c2, c3, ... )    values ( :new.c1, :new.c2, :new.c3, ... ); end;

>Could somebody please advise the equivalent syntax for Oracle. Assume
>source_table and destination_table have the same layout, consisting of
>many columns of mixed types.
>
>Any help most appreciated.
>
>
>Rob
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Fine Grained Access Control", added June 8'th  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Sat Jun 19 1999 - 13:54:00 CDT

Original text of this message

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