📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

A Hospital deletes a Doctor with ON DELETE SET NULL on Patient.DoctorID. What happens to the patients?

A. They remain in the system with DoctorID set to NULL ✅
B. The delete is rejected
C. They are deleted
D. They are assigned to another doctor automatically

Correct Answer: A. They remain in the system with DoctorID set to NULL

Explanation

SET NULL is appropriate when the child can exist independently and only the link is lost.