Delete_Rule-Value (FK) is not correct in dba_constraints after changing it
Delete_Rule-Value is not correct in dba_constraints after changing it
Oracle EE 8.1.7.3.50
I changed the DELETE_RULE to 'Set null'
Code:
-- Create/Recreate primary, unique and foreign key constraints
alter table T_CHILD
drop constraint T_CHILD_T_PARENT_FK;
alter table T_CHILD
add constraint T_CHILD_T_PARENT_FK foreign key (ID)
references T_PARENT (ID) on delete set null;
DBA_CONSTRAINTS
Code:
CONSTRAINT_NAME CONSTRAINT_TYPE TABLE_NAME DELETE_RULE STATUS DEFERRABLE DEFERRED VALIDATED GENERATED BAD RELY LAST_CHANGE
------------------------------ --------------- ------------------------------ ----------- -------- -------------- --------- ------------- -------------- --- ---- -----------
T_PARENT_PK P T_PARENT ENABLED NOT DEFERRABLE IMMEDIATE VALIDATED USER NAME 07.01.2003
T_CHILD_T_PARENT_FK R T_CHILD NO ACTION ENABLED NOT DEFERRABLE IMMEDIATE VALIDATED USER NAME 07.01.2003
But its val is still 'NO ACTION'
But the DDL works : when i delete parent-rows the child-id is set to null
Where does oracle know what to do?
Orca