Wednesday, August 7, 2019

Explain user defined exceptions in oracle.

A User-defined exception has to be defined by the programmer.
User-defined exceptions are declared in the declaration section with their type as exception.
They must be raised explicitly using RAISE statement, unlike pre-defined exceptions that are raised implicitly.

RAISE statement can also be used to raise internal exceptions.

Exception:

DECLARE
userdefined  EXCEPTION;

BEGIN
<Condition on which exception is to be raised>
RAISE userdefined;

EXCEPTION
WHEN userdefined THEN
<task to perform when exception is raised>
 END;

No comments:

Post a Comment

AME (Approval Management Engine)

AME (Approval Management Engine) : AME Stands for Oracle Approval Management Engine. AME is a self service web application that enables...