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...

How do you handle exceptions. Give the syntax for it?

Answer Posted / guest

declare
khali exception;
a number(8);
b number(8);
begin
select count(*) into b from &table_name;
dbms_output.put_line('value of b is '||b);
if b = 0 then
raise khali;
end if;
exception
when khali then
dbms_output.put_line('are ye table to khali
nikali');
when others then
select NUM into a from furzi2;
dbms_output.put_line('Others');
end;
/

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I find duplicates in sql?

929


What is out parameter used for eventhough return statement can also be used in pl/sql?

1077


How to write html code in pl sql?

1115


how many ways we can we find the current date using mysql? : Sql dba

1099


What is pl sql package?

1031


How to download oracle sql developer?

1106


How do you write a complex sql query?

1077


Why select is used in sql?

1020


Do we need commit after truncate?

1079


What are views in sql?

988


What is a dirty read sql?

1137


Sql technical questions

1279


What is the difference between cross join and natural join?

1022


Why functions are used in sql?

990


what is cursor. write example of it. What are the attributes of cursor.

1391