Popular Tutorials
HTML
View allJavaScript
View allException in PL/SQL
An error occurs during the program execution is called Exception in PL/SQL.
PL/SQL facilitates programmers to catch such conditions using exception block in the program and an appropriate action is taken against the error condition.
There are two type of exceptions:
1. System-defined Exceptions
2. User-defined Exceptions
Syntax for exception handling:
DECLARE <declarations section> BEGIN <executable command(s)> EXCEPTION <exception handling goes here > WHEN exception1 THEN exception1-handling-statements WHEN exception2 THEN exception2-handling-statements WHEN exception3 THEN exception3-handling-statements ........ WHEN others THEN exception3-handling-statements END;
For example :
Output :
No such Person! PL/SQL procedure successfully completed.
Let us learn Triggers in PL/SQL
Share this page on :
© 2022 AnalyzeCode.com All rights reserved.