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

what is meant by nl2br()? : Sql dba

974


What is foreign key and example?

886


what is difference between delete and truncate commands? : Sql dba

1065


What is the difference between delete and truncate commands?

976


Define concurrency control. : Transact sql

1103


What is pragma in pl sql?

1020


What is a heap in sql?

992


What is cursor in pl sql with examples?

953


Explain alias in sql?

994


does sql support programming? : Sql dba

990


what is a primary key? : Sql dba

982


How many joins in sql?

945


What is a call statement? Explain with an example.

951


What is the importance of sqlcode and sqlerrm?

1277


How to get list of all tables from a database?

1107