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

Can you have a foreign key without a primary key?

955


What are the main features of cursor?

1071


How does postgresql compare to mysql?

1035


Why are cursors used?

1122


What is offset in sql query?

1121


what is the command line end user interface - mysql? : Sql dba

981


How consistent is the view of the data between and within multiple sessions, transactions or statements ?

2223


What does (*) mean in sql?

953


where are cookies actually stored on the hard disk? : Sql dba

1030


What if we write return in procedure?

1429


how can we know the number of days between two given dates using mysql? : Sql dba

1048


What is an implicit commit?

1058


What is a common use of group by in sql?

1051


How do I remove all records from a table?

1075


what is sql profiler? : Sql dba

1048