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

Why do we use sqlite?

962


What does stand for in sql?

960


explain mysql aggregate functions. : Sql dba

980


Define commit?

991


difference between anonymous blocks and sub-programs.

1126


What do you mean by stored procedures?

1004


How do I partition a table in sql?

1116


how to add a new column to an existing table in mysql? : Sql dba

1061


What is a memo field?

958


What is the difference between view and stored procedure?

956


How do I edit a trigger in sql developer?

988


what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?

2475


What is assignment operator in pl sql?

1026


Compare sql & pl/sql

1120


How to make a copy values from one column to another in sql?

1028