📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

A university deletes a Course with ON DELETE CASCADE on Enrolment.CourseID. What happens to the enrolments for that course?

A. They are automatically deleted along with the course ✅
B. They remain with CourseID set to NULL
C. They remain unchanged with the old CourseID
D. They are moved to another course automatically

Correct Answer: A. They are automatically deleted along with the course

Explanation

CASCADE propagates the parent delete to all dependent child rows, so enrolments for the deleted course disappear.