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 is a dirty read sql?
Can we insert data into view?
Can a select statement fire a trigger?
How much does sql certification cost?
Mention what is the use of function "module procedure" in pl/sql?
How does left join work in sql?
What does the hierarchical profiler does?
What is a natural join?
How to use transactions efficiently : transact sql
How can use stored procedures in sql?
Explain what is rdbms?
Describe sql comments?
What is oracle sql developer?
Is it possible to create the following trigger: before or after update trigger for each row?
Can we create a trigger on view?