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
Can we alter stored procedure?
what is self join and what is the requirement of self join? : Sql dba
What is trigger and types?
what is the difference between undefined value and null value? : Sql dba
what is a database? : Sql dba
How do I make my sql query run faster?
How to run sql functions in pl/sql?
Is sql difficult?
Mention what does plv msg allows you to do?
how to get help information from the server? : Sql dba
list out some tools through which we can draw e-r diagrams for mysql. : Sql dba
how to use like conditions? : Sql dba
how to include character strings in sql statements? : Sql dba
What is union, minus and interact commands?
What is composite primary key in sql?