Truncate giving problems.
235699Aug 22 2003 — edited Aug 22 2003
I had kept a process (PL/SQL block) running which was supposed to insert 4000000 rows in a table.
But there was no COMMIT issued inside this block.
By mistake I closed by SQL PLUS session.
Next day when I issued the TRUNCATE command it gives me the error “ORA-02266: unique/primary keys in table referenced by enabled foreign keys”
But there are no rows in this table
See the details below
Connected to:
Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.4.0 - 64bit Production
SQL> select count(*) from calc_policy_details;
COUNT(*)
---------
0
SQL> truncate table calc_policy_details;
truncate table calc_policy_details
*
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys
SQL> delete from calc_policy_details;
0 rows deleted.
SQL> truncate table calc_policy_details;
truncate table calc_policy_details
*
ERROR at line 1:
ORA-02266: unique/primary keys in table referenced by enabled foreign keys
SQL> select count(*) from calc_policy_details;
COUNT(*)
---------
0