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)
there is on exception. how about the table2.id is the primary
key of table2. but sid the primary key of table?
then
I use
alter table table1 add constraint <whatever name> foreign key
(id) references table2 *on delete cascade*
to implement the delete on table 2 whenever I delete sth from
table1?
thanks
The solution I posted previously should also work, but it is more cumbersome.
Hth,
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
Received on Tue Aug 01 2000 - 00:00:00 CDT
![]() |
![]() |