📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

Which combination is logically inconsistent?

A. ON DELETE SET NULL on a foreign key declared NOT NULL ✅
B. ON UPDATE CASCADE on a stable primary key
C. ON DELETE RESTRICT on a mandatory relationship
D. ON DELETE CASCADE on a nullable foreign key

Correct Answer: A. ON DELETE SET NULL on a foreign key declared NOT NULL

Explanation

SET NULL needs to store NULL, so it cannot work on a NOT NULL foreign-key column.