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

Home -> Community -> Usenet -> c.d.o.tools -> Re: trigger question

Re: trigger question

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/08/02
Message-ID: <965168721.954.1.pluto.d4ee154e@news.demon.nl>#1/1

alter table table2 add constraint <whatever name> foreign key(id) references table1 *on delete cascade*

(provided table1.sid is the primary key of that table)

The solution I posted previously should also work, but it is more cumbersome.

Hth,

Sybrand Bakker, Oracle DBA

"luio" <lctNOlcSPAM_at_hotmail.com.invalid> wrote in message news:0f9a4bc8.0f14b5d0_at_usw-ex0104-028.remarq.com...
> in table1. table1.sid (foreign key) reference to table2.id
> (primary in table2),
>
> then after I delete any row from table1, I need to delete the
> row with table2.id = table1.sid from table2 also
>
>
> -----------------------------------------------------------
>
> Got questions? Get answers over the phone at Keen.com.
> Up to 100 minutes free!
> http://www.keen.com
>
Received on Wed Aug 02 2000 - 00:00:00 CDT

Original text of this message

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