Oracle
1Z0-882 · Question #52
The contents of the parent and child tables are: The child table has the parent_id column that has a foreign key constraint to the id column of the parent table with ON DELETE CASCADE clause…
The correct answer is C. It deletes one row from the parent table and two rows from the child table. See the full explanation below for the reasoning.
Question
The contents of the parent and child tables are:
The child table has the parent_id column that has a foreign key constraint to the id column of the parent table with ON DELETE CASCADE clause. Consider the command WHERE id =1; What is the effect of the above command?
Options
- AIt does not delete anything from any table but returns an error.
- BIt deletes one row from the parent table but does not affect the child table.
- CIt deletes one row from the parent table and two rows from the child table.
- DIt deletes one row from the parent table and sets the parent _id column to NULL in the child.
How the community answered
(47 responses)- A4% (2)
- B6% (3)
- C74% (35)
- D15% (7)
Community Discussion
No community discussion yet for this question.