What are the exceptions? Types of exceptions? Oracle PL SQL Interview Questions And Answers For Experience & Freshers | Interview Preparation

What are the exceptions? Types of exceptions? Oracle PL SQL Interview Questions And Answers For Experience & Freshers | Interview Preparation


Exceptions:
Runtime error is called as exception, whenever runtime error is occurred PLSQL program terminated abnormally. 
In PLSQL we are handling this exceptions under exception handler in exception section of the PLSQL block.

Types of exceptions:

1) Predefined exceptions

Oracle having 20 predefined exception names for regularly occurred runtime errors.
no_data_found (ORA-1403)
too_many_rows (ORA-1422)
zero_divide (ORA-1476)
invalid_cursor (ORA-1001)
cursor_already_open (ORA-6511)
dup_val_on_index (ORA-0001)
invalid_number (ORA-1722)
value_error (ORA-6502)

2) User defined exceptions

In oracle we can also create our own exception name and also raise that exception whenever necessary. 

In PLSQL we are handling user defined exceptions in three step process:

i) Declare
In declare section we can create our own exception name by using predefined exception type.

ii) Raise
We must raise this exception either in executable section or in exception section by using raise statement.

iii) Handling exception
We can handle user defined exceptions same like predefined exceptions by using exception handler under exception section of the PLSQL block.

Please do check our daily posts, videos for beneficial informations, in case of any additional queries please do contact us, we are happy to assist you.

Please Do SUBSCRIBE our Youtube Channel and Support us :-
https://www.youtube.com/a4uofficial

If any difficulties regarding our posts, videos or other problem you can direct contact us:- allforyoucreators@gmail.com

If you found this post was helpful then please don't forget to SUBSCRIBE our channel.
Subscribe us for more such posts, videos and updates.. It's Free!!

For Businesses Inquiries :- allforyoucreators@gmail.com
_____________________________________________________________________________

Join Us on Social Media -
Like our Facebook Page :- https://www.facebook.com/a4u0fficial/

PLEASE SUBSCRIBE US FOR MORE POSTS, VIDEOS AND STAY TUNED..
CREATIVE, INFORMATIVE & BENEFICIAL CONTENTS TO BE FOUND ON OUR CHANNEL!!
BECAUSE WE KEEP UPLOADING VIDEOS ON YOUTUBE FOR YOU..
ALL WE NEED IS YOUR SUPPORT ❤

=▶ Thanks for your Love and Support ◀=

Copyright ©All For You Official

Post a Comment

0 Comments