0 votes 0 votes Databases sql + – mukul maurya asked Sep 1, 2018 mukul maurya 510 views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply MiNiPanda commented Sep 2, 2018 reply Follow Share I think it is C.. Actually using ON DELETE RESTRICT should cause compilation error...it won't us delete tuple from parent table.. 0 votes 0 votes Shaik Masthan commented Sep 2, 2018 reply Follow Share ON DELETE RESTRICT means, if your deleting tuple references in some other table then this deletion is not possible if your deleting tuple didn't references in some other table then this deletion is possible stu_id stu_name 1 A 2 B 3 C course_id stu_id fee 101 1 10000 102 1 20000 103 2 15000 now deleting tuple (3,C) from student, no problem, it is success but deleting tuple either (1,A) or (2,B) from student, the command is ignored, means those tuples are not deleted. 0 votes 0 votes mukul maurya commented Sep 5, 2018 reply Follow Share what will be the the final option. 0 votes 0 votes pradeepchaudhary commented Sep 30, 2018 reply Follow Share Actually if you go according to the concepts these options are not appropriately describing the situation. First thing the entry which is having a foreign key in course table will not be deleted anyway. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes ON DELETE RESTRICT means you can't delete a given parent row if a child row exists that references the value for that parent row. If the parent row has no referencing child rows, then you can delete that parent row https://stackoverflow.com/questions/8072876/exact-meaning-of-mysqls-foreign-key-on-delete-restrict-clause#:~:text=2%20Answers&text=ON%20DELETE%20RESTRICT%20means%20you,can%20delete%20that%20parent%20row. Himanshu Kumar Gupta answered Jun 12, 2020 Himanshu Kumar Gupta comment Share Follow See all 0 reply Please log in or register to add a comment.