📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

A Student record is deleted with ON DELETE CASCADE on Enrolment.StudentID and ON DELETE CASCADE on Payment.StudentID. What happens?

A. The student remains
B. Both the enrolments and payments for that student are deleted ✅
C. The payments remain
D. The courses are deleted

Correct Answer: B. Both the enrolments and payments for that student are deleted

Explanation

CASCADE applies independently on each child table, so all dependent rows in both tables are removed.