Question:
What is an Exception ? What are types of Exception ?
Answer:
Exception is the error handling part of PL/SQL block. The types are Predefined and user defined. Some of Predefined exceptions are. CURSOR_ALREADY_OPEN DUP_VAL_ON_INDEX NO_DATA_FOUND TOO_MANY_ROWS INVALID_CURSOR INVALID_NUMBER LOGON_DENIED NOT_LOGGED_ON PROGRAM-ERROR STORAGE_ERROR TIMEOUT_ON_RESOURCE VALUE_ERROR ZERO_DIVIDE OTHERS. Source: CoolInterview.com
An exception is an identifier/error that is handle by pl/sql block. Exception is two types 1.Predefind exception 2.Userdefined exception predefind exceptions are 1.TOO_MANY_ROWS 2.INVALID_CURSOR 3.NO_DATA_FOUND 3. Source: CoolInterview.com
Answered by: sudipta das | Date: 4/17/2008
| Contact sudipta das
Exception is the error handling part of PL/SQL block.There are 3 types of Exceptions: a) Named System Exceptions :- System exceptions are automatically raised by Oracle. Eg. NO_DATA_FOUND , ZERO_DIVIDE etc. b) Unnamed System Exceptions :- Those system exception for which oracle does not provide a name. Eg. When others c) User-defined Exceptions :- we can explicity define exceptions based on business rules,are called user defined Exception. Source: CoolInterview.com
Answered by: Sheetal Mittal | Date: 9/1/2009
| Contact Sheetal Mittal
An Exception is an abnormal behavior of an Object in a perticular situation.. Untill the situation won't come, the Exception remains silent. For example, z=x/y; until y=0 the exception won't be raised.. so when an exception raised.. we have to take the record pointer to the safe place, to control it.. for example, If a Dog(Object) on the road, one day barks and bites people on the road (an Exception Raised) we take it to the Animal's Hospital..(taking the pointer to the safe place that is Exception Block). Source: CoolInterview.com
Answered by: MOHAMMAD ZAINULABDIN | Date: 10/26/2009
| Contact MOHAMMAD ZAINULABDIN
An exceptions is an identifier in PL SQL that is raised during program execution. There are 3 tyes of exceptions: 1. Predefined Exceptions: These are raised by oracle itself. 2. Non-predefined Exceptions: Declare the exception in declarative section and allow oracle to raise the error implicitly. This can be done using PRAGMA_EXCEPTION_INIT. 3. User defined exception: We can explictly define the exceptions bases on business rules and raise by using RAISE keyword Source: CoolInterview.com
Answered by: RadhaMadhavi | Date: 10/27/2009
| Contact RadhaMadhavi
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|