what is the difference between pragma exception_init and
raise_application_error



what is the difference between pragma exception_init and raise_application_error..

Answer / welcomeashwin

PRAGMA EXCEPTION_INIT allows to associate an Oracle error
number with the name of a user-defined error. Here you need
to defined user-defined exception before it is used in
PRAGMA EXCEPTION_INIT. There are two parameters: exception
name and error code.

RAISE_APPLICATION_ERROR allows to create meaningful error
msg.it works with un-named user defined exceptions. It
associates the number of the error with the text of the
error. Therefore, the user-defined exception does nat have a
name associated with it. There are three parameter:
err_number, err_msg, keep-err

Is This Answer Correct ?    40 Yes 4 No

Post New Answer

More SQL PLSQL Interview Questions

Explain the difference between cursor declared in procedures and cursors declared in the package specification?

1 Answers  


Write a sql query to get the third highest salary of an employee from employee_table?

1 Answers  


1.when will you use week refcursor and when will you use strong ref cursor ? 2.what is the use of sql trace..how do you use it ? 3.can you please send all the sql plus commands...like set line 6000....

1 Answers   Satyam,


what happens if null values are involved in expressions? : Sql dba

1 Answers  


Is null operator in sql?

1 Answers  


What is execution plan in sql?

1 Answers  


A table has 150 records. How do you retrieve 100th row to 120th row from that table ?

21 Answers   IBM,


can i write pl/sql code in a package

2 Answers  


Is there any problem if we use commit repeatedly after each dml statement in a plsq procedure ? (eg. there are 10 update stmt and using 10 commit stmt after each update stmt)

1 Answers  


what is collation? : Sql dba

0 Answers  


how to analyze tables with 'mysqlcheck'? : Sql dba

1 Answers  


What is pl/sql tables?

7 Answers   TCS,


Categories