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
Why do we use sqlite?
What does stand for in sql?
explain mysql aggregate functions. : Sql dba
Define commit?
difference between anonymous blocks and sub-programs.
What do you mean by stored procedures?
How do I partition a table in sql?
how to add a new column to an existing table in mysql? : Sql dba
What is a memo field?
What is the difference between view and stored procedure?
How do I edit a trigger in sql developer?
what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?
What is assignment operator in pl sql?
Compare sql & pl/sql
How to make a copy values from one column to another in sql?