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: alter table constraint fails

Re: alter table constraint fails

From: Brian Peasland <dba_at_remove_spam.peasland.com>
Date: Mon, 8 Sep 2003 14:48:23 GMT
Message-ID: <3F5C96B7.9B289668@remove_spam.peasland.com>


Your ON DELETE clause was incorrect. The only valid options are ON DELETE CASCADE and ON DELETE SET NULL. There is no ON DELETE NO ACTION, no ON DELETE RESTRICT, nor ON UPDATE RESTRICT in Oracle.

HTH,
Brian

Michael Hill wrote:
>
> The sql is successful and I don't get the error if I use:
>
> ALTER TABLE LI_ESTIMATES
> ADD CONSTRAINT XFK_EST_COST_ID FOREIGN KEY (EST_COST_ID)
> REFERENCES LI_COST_CAT(EST_COST_ID)
> ON DELETE CASCADE
>
> Michael Hill wrote:
>
> > Is it the same as
> >
> > ALTER TABLE LI_ESTIMATES
> > ADD CONSTRAINT XFK_EST_COST_ID FOREIGN KEY (EST_COST_ID)
> > REFERENCES LI_COST_CAT(EST_COST_ID)
> > ON DELETE NO ACTION
> >
> > ?
> >
> > Mike
> >
> > Michael Hill wrote:
> >
> > > I am getting a ORA-00905 missing keyword
> > >
> > > when I attempt to execute this sql
> > >
> > > ALTER TABLE LI_ESTIMATES
> > > ADD CONSTRAINT XFK_EST_COST_ID FOREIGN KEY (EST_COST_ID)
> > > REFERENCES LI_COST_CAT(EST_COST_ID)
> > > ON DELETE RESTRICT
> > > ON UPDATE RESTRICT
> > >
> > > Anyone see anything wrong with this?
> > >
> > > Mike

-- 
===================================================================

Brian Peasland
dba_at_remove_spam.peasland.com

Remove the "remove_spam." from the email address to email me.


"I can give it to you cheap, quick, and good. Now pick two out of
 the three"
Received on Mon Sep 08 2003 - 09:48:23 CDT

Original text of this message

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