types of exceptions and what is meant by pragma
autonomous_transaction ?what is the use.
Answers were Sorted based on User's Feedback
Answer / madhav
Exceptions are 3 types
.Predefined
.by default oracle provide error handlers and error
numbers.user can handle that.
data_not_found,too_many_rows,cursor_already_open
.Non predefined exceptions
.Error handlers are not available
.Only Error numbers are avalable
.By using pragma user can handle that
example:- child_record exception;
pragma exception_init(child_record,-2292);
.User defined exceptions
.Error handlers are not available
.Error numbers are also not available
.user can raise and handle that based on business
logic
example:-no_data exception(declaration section)
raise no_data(execution section)
when no_data then(exception sectiion)
dbms_output.put_line('data is not
available');
end;
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / suresh babu
Two types of exceptions used in oracle.
1.Predefined exceptions,which defined by oracle
already.Ex-NO_DATA_FOUND,DIVIDE_BY_ZERO,etc...
2.User defined exceptions,which defined by the user based on
their application requirement.
pragma autonomous_transaction is an independent
transaction.Once we issue commit,we cannot rollback except
the block,where we mentioned autonomous_transaction.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / muthu nagaraj
pragma autonomous_transaction are used to implement DCL
queries in a trigger
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / rajesh venati
Exceptions are classified into two types,
They are
1. Predefined Exceptions
2. User Defined Exceptions
==> Oracle created some of the Predefined Exceptions like
ex: no_data_found etc.,
==> User Defined Exceptions are created by us.
types of user defined exceptions are
a. Raise
b. Raise_Application_Error
One more exception also there
pragma exception_init(exception,error_code)
Then come for Pragma Autonomous Transaction.
Pragma Autonomous Transaction is used to commit or rollback
the active block only.
As well as in a triggers dcl commands are not possible to
used, if u want use dcl command inside a triggers then we
will go for pragma autonomous transaction.
| Is This Answer Correct ? | 1 Yes | 0 No |
What is a trigger in sql?
Write a simple program on cursors
How do you get all records from 2 tables. Which join do you use?
what are the advantages of using stored procedures? : Sql dba
What is the difference between RDBMS and DBMS?
20 Answers Practical Viva Questions, Sapient, Stag Computers,
How to run pl/sql statements in sql*plus?
Which version of sql do I have?
What is meant by user defined function?
Is oracel sql developer written in java?
why should required for Indexed by table in pl/sql
Which function is used to return remainder in a division operator in sql?
How can you load microsoft excel data into oracle? : aql loader
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)