Bulk Exception In Oracle | Oracle PL SQL Interview Questions And Answers For Experience & Freshers | Interview Preparation
In PLSQL if DML statements available inside a loop then those DML statements degrades performance because context switches between SQL engine and PLSQL engine is more.
To overcome this bulk bind coding is introduced using FORALL statement.
FORALL executes multiple DML statements at a time. whenever exception occur default behavior is:
1) That statement roll backed and FORALL execution stops
2) All previous successful statements not roll backed.
If you want to continue FORALL statement execution after exception occur also then we can use save exception clause in FORALL statement.
Save exceptions clause save exception information and continue processing all DML statements.
save exceptions clause internally automatically create predefined index by table.
This index by table name is sql%bulk_exceptions. this index by table having two fields.
1) error_index
2) error_code
error_index field stores index number of the collection where exception is occurred in bulk bind process.
error_code field stores oracle error number where error occurred in bulk bind process.
For handling bulk exception we can use two steps:
1) Add save exceptions clause
2) Count number of exceptions in pseudo collection
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
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!!
Subscribe here : https://www.youtube.com/a4uofficial
For Businesses Inquiries :- allforyoucreators@gmail.com
_____________________________________________________________________________
Join Us on Social Media -
Like our Facebook Page :- https://www.facebook.com/a4u0fficial/
Follow me on Instagram :- https://www.instagram.com/allforyouofficial.01/
Twitter :- https://twitter.com/a4uofficial
Website :- https://allforyouofficial.com/
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
0 Comments