Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is pragma exception and how, when, where us

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


Please Help Members By Posting Answers For Below Questions

What is a dirty read sql?

1033


Can we insert data into view?

848


Can a select statement fire a trigger?

1097


How much does sql certification cost?

1015


Mention what is the use of function "module procedure" in pl/sql?

1006


How does left join work in sql?

939


What does the hierarchical profiler does?

1003


What is a natural join?

991


How to use transactions efficiently : transact sql

991


How can use stored procedures in sql?

1079


Explain what is rdbms?

991


Describe sql comments?

960


What is oracle sql developer?

992


Is it possible to create the following trigger: before or after update trigger for each row?

1236


Can we create a trigger on view?

841