Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: truncate problem
I forgot to mention that I have followed the 'Action' instructions from
the 'oerr ora 02266' statement:
*Action: Before performing the above operations the table, disable the
// foreign key constraints in other tables. You can see what // constraints are referencing a table by issuing the following // command: // SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = "tabnam";
but the above query returns an empty set of data.
kev wrote:
> I've just tried to do a truncate on a table, but get this error:
>
> ORA-02266: unique/primary keys in table referenced by enabled foreign
> keys
>
> The table was created like this:
>
> create table headline
> (
> id number(10) primary key,
> headline varchar2(200),
> url varchar2(200),
> grabtime number(15),
> comments varchar2(200),
> lang number(4),
>
> constraint fk_headline_lang
> foreign key (lang)
> references language (id)
> );
>
> Is the constraint causing the problem? No row in the headline table has
> any value in the lang column.
>
> thanks,
>
> - Kev
Received on Wed Oct 27 1999 - 06:53:50 CDT