filmov
tv
PLSQL tutorial#18 Deep dive in PLSQL exception - create an exception in oracle database

Показать описание
In this pl slq tutorial, we are going to learn exception oracle pl/sql programming which includes exception creation, exception raise, exception handling
also, we are going to learn how to create your own ( user-defined exception)
This complete PLSQL online training course will give you in-depth knowledge of PLSQL exception.
What is the exception?
The exception is a kind of mechanism which is used to handle any kind of error which is occurred in plsql program
Type of exception :
System-defined exceptions
User-defined exceptions
System-defined exceptions : These errors/exceptions are pre-defined in oracle data
e.g.NO_DATA_FOUND , TOO_MANY_ROWS ,ZERO_DIVIDE ,INVALID_CURSOR
User-defined exceptions: Its user-defined error/exception as per user requirement
Syntax exception handling:
declare
declare some variable.
begin
write you logic
EXCEPTION
WHEN exceptionName1 THEN
Write Logic to handle error;
WHEN exceptionName2 THEN
Write Logic to handle error;
WHEN others THEN
Write Logic to handle error;
end;
Syntax for to create your own exception:
DECLARE
exception_name EXCEPTION;
BEGIN
IF condition THEN
RAISE exception_name;
END IF;
EXCEPTION
WHEN exception_name THEN
statement;
END;
Oracle SQL Complete Tutorial/Training/Course for the beginner:
follow me on:
Facebook Page:
also, we are going to learn how to create your own ( user-defined exception)
This complete PLSQL online training course will give you in-depth knowledge of PLSQL exception.
What is the exception?
The exception is a kind of mechanism which is used to handle any kind of error which is occurred in plsql program
Type of exception :
System-defined exceptions
User-defined exceptions
System-defined exceptions : These errors/exceptions are pre-defined in oracle data
e.g.NO_DATA_FOUND , TOO_MANY_ROWS ,ZERO_DIVIDE ,INVALID_CURSOR
User-defined exceptions: Its user-defined error/exception as per user requirement
Syntax exception handling:
declare
declare some variable.
begin
write you logic
EXCEPTION
WHEN exceptionName1 THEN
Write Logic to handle error;
WHEN exceptionName2 THEN
Write Logic to handle error;
WHEN others THEN
Write Logic to handle error;
end;
Syntax for to create your own exception:
DECLARE
exception_name EXCEPTION;
BEGIN
IF condition THEN
RAISE exception_name;
END IF;
EXCEPTION
WHEN exception_name THEN
statement;
END;
Oracle SQL Complete Tutorial/Training/Course for the beginner:
follow me on:
Facebook Page:
Комментарии