1Z0-873 · Question #113
Which of the following would be the effect of setting REFERENCES with ON UPDATE CASCADE?
The correct answer is C. Changes made to the parent record are passed down to the corresponding child records. It specifies what actions to take if records are modified in the referenced table. The foreign key definition shown specifies the CASCADE action for both UPDATE and DELETE This means that changes in the parent table are cascaded down to the child table. If you change a Code…
Question
Which of the following would be the effect of setting REFERENCES with ON UPDATE CASCADE?
Options
- AChanges to the parent record would be disallowed if there were any corresponding child records.
- BRecords could only be updated and not deleted regardless if they have any corresponding child
- CChanges made to the parent record are passed down to the corresponding child records.
How the community answered
(30 responses)- A17% (5)
- B7% (2)
- C77% (23)
Explanation
It specifies what actions to take if records are modified in the referenced table. The foreign key definition shown specifies the CASCADE action for both UPDATE and DELETE This means that changes in the parent table are cascaded down to the child table. If you change a Code value in the CountryParent table, InnoDB changes any corresponding CityChild records with that value in the CountryCode column to match. If you delete a CountryParent record, InnoDB also deletes any CityChild records with the same
Topics
Community Discussion
No community discussion yet for this question.