Database Error Messages

Release
toggle
  • 23ai
  • 21c
  • 19c
Updated
Jun 24, 2024

OCI-14705

unique or primary keys referenced by enabled foreign keys in table "string"."string"

Cause

An attempt was made to truncate a table with unique or primary keys referenced by enabled foreign keys in another table.


Action

Before performing the TRUNCATE operation on the table, disable the foreign key constraints in other tables. You can see what constraints exist in a table by issuing the following command: SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = :1;