📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

What does ON UPDATE SET DEFAULT do when a parent key changes?

A. It sets the child foreign key to a defined default value ✅
B. It prevents the update
C. It sets the child foreign key to NULL
D. It deletes the child rows

Correct Answer: A. It sets the child foreign key to a defined default value

Explanation

SET DEFAULT on update replaces the foreign key with the default value instead of following the new parent key.