TABLEA has the following primary key definition:
PRIMARY KEY ( COL1 )
TABLEB has the following foreign key definition:
FOREIGN KEY FK1 ( COLY ) REFERENCES TABLEA ON DELETE CASCADE
What is the result when the SQL UPDATE statement below is executed?
DELETE FROM TABLEA WHERE COL1 = HV1
A. The delete will fail because a primary key value cannot be deleted.
B. The row will be deleted in all cases.
C. The row will be deleted from TABLEA and all rows from TABLEB where COLY = HV1 will also be deleted.
D. The row will be deleted only if no rows exist in TABLEB where COLY = HV1.
E. The row will be deleted only if a separate delete statement is executed before the next COMMIT, deleting all rows from TABLEB where COLY = HV1 if any such rows exist.
ON DELETE CASCADE means whenever a row in PARENT table (TABLEA) is requested to delete, corresponding rows in all child tables dependent on the parent table (TABLEA) will be deleted. This cascade applies to all lower level child tables that are inturn depent on TABLEB using ON DELETE CASCADE option.