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

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to specify cascade delete when CREATE/Alter a table?

Re: How to specify cascade delete when CREATE/Alter a table?

From: Weiming He <weiming_at_wt.infi.net>
Date: Fri, 27 Aug 1999 21:53:57 -0300
Message-ID: <37C73325.5BED@wt.infi.net>


Frances Edelstein:

Thank you for your help. I tested on two tables with your CREATE command syntax, it works fine.

I visited http://www.rbsbooks.com site. It is a perfect site for learning Oracle. I was so lucky that I got following solution from you - the author of many Oracle books.

Weiming

Frances Edelstein wrote:
>
> Delete cascade belongs with the referential integrity section of the create
> table statement.
> For example:
>
> create table b (
> col1 integer primary key,
> col2 integer references table a (col1) on delete cascade,
> col3 integer);
>
> If a record in table a is deleted ,
> any records in table b will be deleted
> where the value in b.col2 = the volue in a.col1 of its deleted record.
>
> Take a look at the sample chapter of my tutorial on Oracle 7 concepts and
> techniques,
> called Learning Oracle Database Programming. It teaches the fundamentals of
> referential ingegrity.
> http://www.rbsbooks.com
>
> Frances Edelstein
> Relational Business Systems
> fran_at_rbsbooks.com
Received on Fri Aug 27 1999 - 19:53:57 CDT

Original text of this message

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