Database Management
Accenture Technical PrimermediumDatabase ManagementData Manipulation Language

Which of the update statement produces the following error in the employee table? ORA-02291: integrity constraint (SYS_C23) violated - parent key not found.

Answer options

A
UPDATE Employee SET Deptid=3 WHERE Empid = 101;
B
UPDATE Employee SET Deptid=3;
C
UPDATE Employee SET Empid = 101;
D
UPDATE Employee SET Deptid=3, Empid=101;

Correct answer: UPDATE Employee SET Deptid=3 WHERE Empid = 101;

Explanation

Quick AnswerThe correct answer is UPDATE Employee SET Deptid=3 WHERE Empid = 101; because it directly addresses the core logic of Database Management.

Setting a foreign key value to a non-existent department ID causes an integrity constraint violation.

Related Accenture Database Management questions

Practice more Accenture Database Management questions

PrimerPrep has 1400+ practice questions, 2026 simulations and coding hands-on — all free.

Watch Walkthroughs!