Multiple choice technology databases

DUP_VAL_ON_INDEX corressponds to which of the following error.

  1. ORA-01427

  2. ORA-01476

  3. ORA-00001

  4. ORA-01001

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

DUP_VAL_ON_INDEX is a predefined PL/SQL exception that is raised when an INSERT or UPDATE statement attempts to duplicate values in a column with a unique constraint or unique index. This corresponds to Oracle error ORA-00001 (unique constraint violated). ORA-01427 is for single-row subquery returning multiple rows, ORA-01476 is division by zero, and ORA-01001 is for invalid cursor.