SQL (Structured Query Language) Question:
Download Questions PDF

When invoking this procedure, you encounter the error?

Answer:

When invoking this procedure, you encounter the error:
ORA-000: Unique constraint(SCOTT.THEATER_NAME_UK) violated.
How should you modify the function to handle this error?
1. An user defined exception must be declared and associated with the error code and handled in the EXCEPTION section.
2. Handle the error in EXCEPTION section by referencing the error code directly.
3. Handle the error in the EXCEPTION section by referencing the UNIQUE_ERROR predefined exception.
4. Check for success by checking the value of SQL%FOUND immediately after the UPDATE statement.

Download SQL Interview Questions And Answers PDF

Previous QuestionNext Question
For which trigger timing can you reference the NEW and OLD qualifiers?The CHECK_THEATER trigger of the THEATER table has been disabled. Which command can you issue to enable this trigger?