Message-Id: <10697.123428@fatcity.com> From: "Cale, Rick T (Richard)" Date: Fri, 1 Dec 2000 10:41:18 -0800 Subject: RE: ORA - 02266 -unique/primary keys in table referenced by enabl I do not think you could do a delete from prod_master if the FK was enabled on the prod_details. This would work however if you had a delete cascade which would delete master records and dependent records. Rick > -----Original Message----- > From: Kimberly Smith [SMTP:kimberly.smith@gmd.fujitsu.com] > Sent: Friday, December 01, 2000 11:05 AM > To: Multiple recipients of list ORACLE-L > Subject: RE: ORA - 02266 -unique/primary keys in table referenced by > enabl > > You cannot truncate a table with a foreign key. > > -----Original Message----- > Sent: Friday, December 01, 2000 12:45 AM > To: Multiple recipients of list ORACLE-L > foreign > > > 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 > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: > INET: RanganathK@lgcommerznow.com > > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 > San Diego, California -- Public Internet access / Mailing Lists > -------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.com > -- > Author: Kimberly Smith > INET: kimberly.smith@gmd.fujitsu.com > > Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 > San Diego, California -- Public Internet access / Mailing Lists > -------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing).