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

Home -> Community -> Usenet -> c.d.o.server -> Re: constraint modification

Re: constraint modification

From: Doug Cowles <dcowles_at_nospambigfoot.com>
Date: Sat, 18 Dec 1999 00:18:58 -0500
Message-ID: <385B1941.7390AA4B@nospambigfoot.com>


Oh well.

Sybrand Bakker wrote:

> No, sorry
>
> Hth
>
> --
> Sybrand Bakker, Oracle DBA
> Doug Cowles <dcowles_at_nospambigfoot.com> wrote in message
> news:385A706F.6ADF7ED2_at_nospambigfoot.com...
> > Is there any way to take an existing foreign key constraint and modify
> > it to also
> > be on delete cascade or on delete set null without recreating the
> > constraint from scratch?
> >
> > For example -
> > create table A( a number);
> > alter table A add constraint apk primary key (a);
> > create table B( b number);
> > alter table B add constraint bfk foreign key (b) references A(a);
> >
> > SQL>alter table B modify constraint bfk on delete cascasde;
> > alter table B modify constraint bfk on delete cascasde
> > *
> > - > SQL comand not properly ended
> >
> > alter table B modify b add constraint bzy foreign key(b) references A(a)
> > on delete
> > cascade;
> > -> Such a constraint already exists in the table..
> >
> > alter table B modify b on delete cascade
> > -> invalid datatype
> >
> > etc.,
> >
> > any way to do this?
> >
> > - Dc.
> >


Received on Fri Dec 17 1999 - 23:18:58 CST

Original text of this message

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