Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to create a database trigger
In article <3A59ABC7.E6D_at_yahoo.com>,
connor_mcdonald_at_yahoo.com wrote:
> Inna wrote:
> >
> > 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/
>
> Check out the ON DELETE CASCADE option when defining a constraint.
> Since you're new, jump to technet.oracle.com and register (its free).
> Then you can have a wander through the documentation.
>
> HTH
> Connor
> --
> ===========================================
> Connor McDonald
> http://www.oracledba.co.uk (mirrored at
> http://www.oradba.freeserve.co.uk)
>
>
Thank you. But I know about delete cascade. I can not make empid foreign key. That is why I need to know how to create a trigger for that.
-- Inna.Junior programmer. Sent via Deja.com http://www.deja.com/Received on Tue Jan 09 2001 - 07:49:43 CST
![]() |
![]() |