User-defined exception, SQLCODE returns 1, & SQLERRM returns User-defined Exception - PL/SQL Errors

Q.  For a user-defined exception, SQLCODE returns 1, and SQLERRM returns ___________.
- Published on 07 Jul 15

a. “User-defined Exception”
b. 1
c. 0
d. None of the above

ANSWER: “User-defined Exception”
 
The SQLCODE is useful in an exception handler. SQLCODE is useful to the other exception handlers as it lets you identify the internal exception which is raised. The SQLERRM will return the user defined exception.

Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)