Home » SQL & PL/SQL » SQL & PL/SQL » Ordering of Exceptions (Oracle9i/10G)
Ordering of Exceptions [message #313074] Thu, 10 April 2008 10:19 Go to next message
vamsikgummadi
Messages: 62
Registered: April 2006
Location: United States, MI
Member
Hi Friends,
Is there any particular order for the exceptions to be used in a stored procedure or functions? I only know that 'WHEN OTHERS THEN' should be used at the end so as to handle the exceptions that we may have missed to handle. Then what about the ordering of exceptions like
No-data-found == when no rows are returned
Cursor-already-open == when a cursor is opened in advance
Dup-val-On-index == for duplicate entry of index..
Storage-error == if memory is damaged
Program-error == internal problem in pl/sql
Zero-divide == divide by zero
invalid-cursor == if a cursor is not open and you are
trying to close it
Login-denied == invalid user name or password
Invalid-number == if you are inserting a string datatype
for a number datatype which is
already declared
Too-many-rows == if more rows r returned by select
statement.
Hope you have understood my question. Please get back if you need some other clarifications from my end. It would be very helpful if you can provide me with the sample snippets if possible.
Thanks,
Vamsi K Gummadi.

Re: Ordering of Exceptions [message #313075 is a reply to message #313074] Thu, 10 April 2008 10:26 Go to previous messageGo to next message
Michel Cadot
Messages: 64107
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No order, they are independent.

Regards
Michel
Re: Ordering of Exceptions [message #313115 is a reply to message #313075] Thu, 10 April 2008 15:06 Go to previous message
vamsikgummadi
Messages: 62
Registered: April 2006
Location: United States, MI
Member
Hi Cadot,
Thank you for the clarification. Actually this question was asked in an interview recently. Thanks once again for clarifying my doubt.
Regards,
Vamsi K Gummadi.
Previous Topic: replicate an Oracle materialized view table to Sybase
Next Topic: how to compile a pl/sql package
Goto Forum:
  


Current Time: Mon Dec 05 04:27:15 CST 2016

Total time taken to generate the page: 0.12975 seconds