Примеры таблиц и данных:
SQL> create table tdept (deptno number constraint pkd primary key);
Table created.
SQL> create table temp (emp number primary key, deptno number constraint fkd
2 references tdept (deptno));
Table created.
SQL>
SQL> insert into tdept values (100);
1 row created.
SQL> insert into temp values (1, 100);
1 row created.
SQL>
Это то, что вы сделали - урезанная таблица подробностей (дочерняя):
SQL> truncate table temp;
Table truncated.
Усеченная главная (родительская) таблица не работает:
SQL> truncate table tdept;
truncate table tdept
*
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys
Поэтому отключите ограничение внешнего ключа, обрежьте основную таблицу и включите FK:
SQL> alter table temp disable constraint fkd;
Table altered.
SQL> truncate table tdept;
Table truncated.
SQL> alter table temp enable constraint fkd;
Table altered.