Showing posts with label Pre-defined Exceptions. Show all posts
Showing posts with label Pre-defined Exceptions. Show all posts

Tuesday, January 9, 2024

Exception Handling | Exceptions | Pre-defined Exceptions | User defined Exceptions | User named Exceptions | NO_DATA_FOUND | TOO_MANY_ROWS | ZERO_DIVIDE | VALUE_ERROR| CURSOR_ALREADY_OPEN | INVALID_CURSOR

 

Exceptions

An exception is an error which disrupts the normal flow of program instructions. PL/SQL provides us the exception block which raises the exception thus helping the programmer to find out the fault and resolve it.

Exceptions are used to handle errors or exceptional conditions that might occur during the execution of a program. They allow you to gracefully manage errors and perform actions based on specific error conditions.

 There are three types of exceptions

1. Pre-defined exceptions

2. User defined exceptions

3. User named exceptions

SQLERRM: It is the return the error message.

SQLCODE: It is return the error code