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 insert delete data in view?

951


What is the difference between a subquery and a join?

1108


How many commands are there in sql?

1029


What is primary key and foreign key?

962


What is string data type in sql?

1144


What is composite primary key in sql?

996


what are the properties and different types of sub-queries? : Sql dba

1034


what is unique key constraint? : Sql dba

1036


How do you delete duplicates in sql query using rowid?

947


How many sql databases can you have on one server?

1083


how to rename an existing table in mysql? : Sql dba

1064


how to get a list of indexes of an existing table? : Sql dba

960


What kind of join is join?

973


what are the advantages and disadvantages of cascading style sheets? : Sql dba

1060


What are the parameter modes supported by pl/sql?

1108