Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ora-02266
"freedba" <p.hirth_at_gmail.com> wrote in message
news:1158246031.098990.145500_at_i3g2000cwc.googlegroups.com...
> Hi,
> someone could tel me how can i do to find table tha conatains a
> foreignkey onto a specific table ?
>
> thank's
>
From tahiti.oracle.com which you could/should have checked don't you think !
<quote>
ORA-02266 unique/primary keys in table referenced by enabled foreign keys
Cause: An attempt was made to drop or truncate a table with unique or primary keys referenced by foreign keys enabled in another table.
Action: Before dropping or truncating 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 constraint_name, table_name, status
from user_constraints
where r_constraint_name in (
select constraint_name from user_constraints where table_name
='tabnam');
</quote>
Received on Thu Sep 14 2006 - 10:27:57 CDT
![]() |
![]() |