Delete data from a table with the following error: ldquo; ORA-02292: violation of the complete constraints (UNITELE. ta_sub_referene3)
To delete the data of a table, the following error occurs: ldquo; ORA-02292: Full constraint condition (UNITELE. ta_sub_referene3)-the sub-record rdquo is found ;. The table has a primary key.
When you delete data from a table, the following error occurs: ORA-02292: Full constraint condition (UNITELE. ta_sub_referene3)-subrecord found ". If the table already has a primary key, the primary key constraint is invalid.
Alter table table_name modify constraint PK_SUB_TASK_T DISABLE;
The error "ORA-02297: Unable to disable constraints (UNITELE. PK_SUB_TASK_T)-correlated" is reported"
This indicates that the table's primary key is used as a foreign key by other tables, and cascade must be added if the restriction is invalid.
Alter table table_name modify constraint PK_SUB_TASK_T disable cascade;
Or alter table table_name disable constraint PK_SUB_TASK_T CASCADE;
In this way, you can delete the data, but after deleting the data, you must set the primary key constraint to valid. Because cascade is used previously, it will also affect the constraint that other tables use this primary key as a foreign key. Therefore, the Union is set to invalid, so it must be set back.
Which of the following tables will be affected?
Select CONSTRAINT_NAME, TABLE_NAME from dba_constraints
Where r_constraint_name = 'pk _ SUB_TASK_T ';