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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to create a database trigger

Re: How to create a database trigger

From: Stephen Savage <stephen_at_fuze-media.com>
Date: Mon, 08 Jan 2001 20:04:39 GMT
Message-ID: <r3p66.5073$Ad7.150852@sodalite.nbnet.nb.ca>

CREATE OR REPLACE TRIGGER trigger_name
BEFORE DELETE ON table_name
BEGIN --your code to be executed on the event goes here..

END;
/

I hope thats of some help..

"Inna" <mednyk_at_my-deja.com> wrote in message news:93ci5r$i0l$1_at_nnrp1.deja.com...
>
>
> Hello everyone.
> Started creating database triggers and realized that know nothing about
> it. Please help me in this problem. I have two tables dept and emp.
> Have primary key ID in emp table and empid in dept, but I can not make
> it foreign. So I need a trigger <Before delete> on table emp, which
> going to delete record in dept table. And I don't know how to do that,
> because my books are not so good, there is no syntax there.
> Thank you in advance.
> --
> Inna.Junior programmer.
>
>
> Sent via Deja.com
> http://www.deja.com/
Received on Mon Jan 08 2001 - 14:04:39 CST

Original text of this message

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