Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Creating Triggers
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