What is an Exception ? What are types of Exception ?

Answers were Sorted based on User's Feedback



What is an Exception ? What are types of Exception ?..

Answer / tulsi

Exception is the error handling part of PL/SQL block. The
types are Predefined and user_defined. Some of Predefined
execptions 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.

Is This Answer Correct ?    6 Yes 0 No

What is an Exception ? What are types of Exception ?..

Answer / chintu

Any ubnormal event in a program is called Exception.
In pl/ sql there are two types of exceptions they are
Userdefind Exception and predefined Exceptions.
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.
user defined exceptions are defined by raise_application_
error("error msg","error number") and
pragma_exception_init()

Is This Answer Correct ?    6 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What are all ddl commands?

0 Answers  


What is difference between TRUNCATE & DELETE?

16 Answers   Ahn Infotech, CitiGroup, ICICI, PreVator, Saama Tech, SkyTech, TCS,


Dear All, Question for this Week Find out possible error(s) (either at compile time or at runtime) in the following PL/SQL block. State the reason(s) and correct the errors. Declare Cursor C1 is select ename, sal, comm from emp; Begin For i in C1 Loop If i.comm between 299 and 999 then Dbms_output.put_line(i.Ename || ‘ ** Good Commission’); Elsif i.comm > 999 then Dbms_output.put_line(i.Empno || ‘ ** Very Good Commission’); close C1; Else Dbms_output.put_line(i.Ename || ‘ ** ’ ||nvl(i.comm,‘O’)); End if; End Loop; End;

7 Answers   Accenture,


how is exception handling handled in mysql? : Sql dba

0 Answers  


what is row? : Sql dba

0 Answers  






How can the performance of a trigger be improved?

0 Answers  


What is sql constant?

0 Answers  


does sql support programming? : Sql dba

0 Answers  


Give the structure of the function ?

2 Answers  


what is a stored procedure? : Sql dba

0 Answers  


What does the sign mean in sql?

0 Answers  


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

0 Answers  


Categories