Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: ORA - 02266 -unique/primary keys in table referenced by enabled foreign keys
Glad to hear that you can do that now....
I found that I always had to DROP the constraint in order to be able to use truncate.
Babette
>
> You need to
>
> disable the appropriate foreign keys
> issue the truncate command
> re-enable to keys
>
> HTH
>
> --- RanganathK_at_lgcommerznow.com wrote: > Dear DBA
> Gurus,
> >
> > I have a question for you which may sound
> > trivial. I beg a pardon if
> > it sounds basic to anyone for having asked it. I
> > have two tables by name
> > prod_master and prod_details. They are master and
> > detail tables
> > respectively i.e. there is a foreign key
> > relationship between these two
> > tables with some data in both the tables. When I
> > try to issue the
> > statement truncate table prod_master it is giving
> > the above mentioned error
> > where as when I issue the statement delete from
> > prod_master and then issue
> > commit I am able to delete the records. How is it
> > happening? This occurs
> > even if I delete all the records from the detail
> > table. Can anybody
> > explain me as to why this is happening? Any views
> > in this regard will be
> > highly appreciated.
> >
> > TIA and regards,
> >
> > Ranganath
> >
> >
> > --------
> > Think you know someone who can answer the above
> > question? Forward it to them!
> > to unsubscribe, send a blank email to
> > oracledba-unsubscribe_at_LAZYDBA.com
> > to subscribe send a blank email to
> > oracledba-subscribe_at_LAZYDBA.com
> > Visit the list archive:
> > http://www.LAZYDBA.com/odbareadmail.pl
> >
>
>
> =====
> Connor McDonald
> http://www.oracledba.co.uk
>
> "Some days you're the pigeon, some days you're the statue"
>
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
>
> --------
> Think you know someone who can answer the above question? Forward it to
them!
> to unsubscribe, send a blank email to oracledba-unsubscribe_at_LAZYDBA.com
> to subscribe send a blank email to oracledba-subscribe_at_LAZYDBA.com
Received on Sun Dec 03 2000 - 05:15:31 CST
![]() |
![]() |