Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: trigger question
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
![]() |
![]() |