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 -> foreign key problem

foreign key problem

From: Gregory Lipman <Gregory.Lipman_at_fmr.com>
Date: Mon, 27 Jul 1998 19:14:40 GMT
Message-ID: <35BCD2C1.31633422@fmr.com>


Hi

I have one master table with primary key say a1 and I have a number of child table that have foreign keys to a1.

I first truncate all child tables.
Then I try to TRUNCATE master table. Here is what I get :



SQL> truncate table t_emp ;
truncate table t_emp

               *
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys

++++++++++++++++++++++++++++++++++++++++++++++++++++

But isnt referential integrity kicks in only there is actual data in child tables ??!!

Thanks Received on Mon Jul 27 1998 - 14:14:40 CDT

Original text of this message

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