PL/SQL Section 7 Quiz

 1. What is a user-defined exception?


(1) Point

2. Which of the following will successfully return a user-defined error message?

(1) Point

3. You want to display your own error message to the user. What is the correct syntax to do this?

(1) Point

4. The following three steps must be performed to use a user-defined exception: - Raise the exception - Handle the exception - Declare the exception In what sequence must these steps be performed?

(1) Point

5. The following code does not violate any constraints and will not raise an ORA-02292 error. What will happen when the code is executed?

BEGIN
    DECLARE
       e_constraint_violation EXCEPTION;
       PRAGMA EXCEPTION_INIT(e_constraint_violation, -2292);
    BEGIN
       DBMS_OUTPUT.PUT_LINE('Inner block message');
    END;
EXCEPTION
    WHEN e_constraint_violation THEN
       DBMS_OUTPUT.PUT_LINE('Outer block message');
END;


(1) Point

Komentar

Postingan populer dari blog ini

PL/SQL Section 15 Quiz

PL/SQL Section 13 Quiz

PL/SQL Section 14 Quiz