Set - 5

Question 81 :

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.


Question 82 :

What are the PL/SQL Statements used in cursor processing ?

Answer :

DECLARE CURSOR name, OPEN cursor name, FETCH cursor name INTO or Record types, CLOSE cursor name.


Question 83 :

What are the components of a PL/SQL Block ?

Answer :

Declarative part, Executable part and Exception part.
Datatypes PL/SQL


Question 84 :

What is a database trigger ? Name some usages of database trigger ?

Answer :

Database trigger is stored PL/SQL program unit associated with a specific database table. Usages are Audit data modifications, Log events transparently, Enforce complex business rules Derive column values automatically, Implement complex security authorizations. Maintain replicate tables.


Question 85 :

What is a cursor ? Why Cursor is required ?

Answer :

Cursor is a named private SQL area from where information can be accessed. Cursors are required to process rows individually for queries returning multiple rows.