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 primary key? : Sql dba

1076


Can we use distinct and group by together?

1102


When is a declare statement required?

1193


What are the main features of cursor?

1108


Which is better stored procedure or query?

1015


What is a full join sql?

1102


Why is theta join required?

1188


how can we know the count/number of elements of an array? : Sql dba

1105


What is the use of sql trace?

1002


Can we commit inside a trigger?

1047


Differentiate pl/sql and sql?

1128


what are the advantages and disadvantages of views in a database? : Sql dba

1072


What does the acronym acid stand for in database management?

1087


How do you remove duplicate records from a table?

978


What is a loop in sql?

1034