Answer Posted / guru
The PRAGMA EXECPTION_INIT tells the complier to associate an
exception with an oracle error. To get an error message
of a specific oracle error.
e.g. PRAGMA EXCEPTION_INIT (exception name, oracle error
number)
Example
declare
salary number;
FOUND_NOTHING exception;
Pragma exception_init(FOUND_NOTHING ,100);
begin
select sal in to salaryfrom emp where ename ='ANURAG';
dbms_output.put_line(salary);
exception
WHEN FOUND_NOTHING THEN
dbms_output.put_line(SQLERRM);
end;
| Is This Answer Correct ? | 10 Yes | 3 No |
Post New Answer View All Answers
What does where 1/2 mean in sql?
What jobs use sql?
Can we change the table name in sql?
what are the limitations of mysql in comparison of oracle? Mysql vs. Oracle. : Sql dba
Can we use two order by clause in query?
Why truncate is faster than delete?
What are the built in functions of sql?
Show the two pl/sql cursor exceptions.
Define select, insert, create, delete, update, drop keywords
Sql technical questions
What are stuff and replace function?
Can you sum a count in sql?
what is a trigger? : Sql dba
What is rank function in sql?
What is difference between joins and union?