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 / debasis mohanty

First We Have To Open Cursor
Then We Use Any Loop For That.
(because number of rows selected if we use loop)
After that Condition.
So That We Get Appropriate Answer.
Thanks & Regards
Debasis
dmddebasismohanty183@gmail.com
08722140827

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an exception in PL/SQL? What are the two types of exceptions?

1305


what is meant by nl2br()? : Sql dba

1031


What are the packages in pl sql?

1009


What is the difference between subquery and correlated query?

1056


can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible? : Sql dba

991


Explain how to use transactions efficiently : transact sql

972


Can we declare a column having number data type and its scale is larger than pricesionex: column_name number(10,100),column_name numbaer(10,-84)

950


Explain autonomous transaction.

1152


What are the different dml commands in sql?

1167


What is crud stand for?

994


What is lexical units in pl sql?

1139


How can I get the number of records affected by a stored procedure?

1057


Is primary key always clustered index?

1014


How do you delete data from a table?

1021


What does inner join mean?

1154