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 are the types of subqueries?
What is asqueryable?
What is the usage of nvl function?
What is database sql?
What is a sql driver?
What is primary key secondary key alternate key candidate key?
What is an intersect?
What is the meaning of disabling a trigger?
What is difference between stored procedures and application procedures?
What is the plv (pl/vision) package offers?
What is the use of sqlerrd 3?
Write a query to find the names of users that begin with "um" in sql?
What will you get by the cursor attribute sql%rowcount?
What are records give examples?
Explian rowid, rownum? What are the psoducolumns we have?