Define Exceptions in PL/SQL.
An exception is raised when any rule or limit is violated by the program and hence causes it to stop. The exception can be either internal or external. Internal exception is raised implicitly whenever our PL/SQL program violates an Oracle rule or exceeds a system-dependent limit. Eg. NO_DATA_FOUND. External exceptions are defined explicitly by the program depending on the application requirement.
Explain how to define and raise exceptions in PL/SQL.
Exceptions in PL/SQL can be defined by the user or use predefined exceptions. If the exception is defined by the user, it must also be raised by the user explicitly.
Declare an exception:DECLARE
Remain_fee EXCEPTION;
The exception can be raised using the RAISE statement.