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: Creating Triggers

Re: Creating Triggers

From: Rob <rob_at_ohall.com>
Date: 1998/10/08
Message-ID: <6vhrqg$mp1$1@goof.de.uu.net>#1/1

Hi,
this must work:

CREATE TABLE Test1 (
 id varchar2(10)
);

CREATE TABLE Test2 (
 id varchar2(10)
);

CREATE OR REPLACE PROCEDURE MakeSomthing IS
 temp1 VARCHAR2(10);
 BEGIN   SELECT id INTO temp1 FROM Test1;
  INSERT INTO Test2 Values ( temp1 );

 END;
/

show errors

CREATE OR REPLACE TRIGGER TestTrigger
 AFTER INSERT ON Test1
 BEGIN
   MakeSomthing;

 END;
/

show errors

insert into Test1 ( id ) values ('1') ;
/

Select * from test2; Received on Thu Oct 08 1998 - 00:00:00 CDT

Original text of this message

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