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

declare
v_count number(8,3);
v_sal scott.emp.sal%type := '&P_sal';
cursor cur_name is select sal from scott.emp where sal
between (v_sal-100) and (v_sal +1000);
begin
v_count :=nvl(sql%rowcount ,0);
if v_count = 0 then
dbms_output.put_line('no records are fetch in the given sal
range');
else
dbms_output.put_line('There is/are '||to_char(v_count)||
' salaries are selected in the given range ');
end if;
end;

in the above programm .....for any sal range ....always it
shows the following message..

no records are fetch in the given sal range

please find the mistake and share with me...with thansk and
regards..sarao....

Answer Posted / sai

First open the cursor and fetch the records then u get the
required output.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we join same table in sql?

1016


Why is pl sql used?

976


what is the stuff function and how does it differ from the replace function? : Sql dba

1043


How can I see all tables in sql?

1066


What are the types of variable use in pl sql?

1074


Is sql better than access?

1014


What is a table?

1007


What is the meaning of disabling a trigger?

1177


What is use of package in pl sql?

1009


what is a database lock ? : Sql dba

1164


How do you update sql?

965


Is nosql relational?

940


Does sql view stored data?

951


What is a variable in sql?

1001


How does cross join work?

947