Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: alter table constraint fails
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
![]() |
![]() |