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
What does t sql mean?
Is postgresql a nosql database?
Does sap use sql?
Why functions are used in sql?
What are the two types of exceptions in pl/sql?
Can two tables have same primary key?
What is difference between hql and sql?
hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews
What are the two types of exceptions.
What is the difference between microsoft sql and mysql?
Can there be more than one function with a similar name in a pl/sql block?
How do you identify a primary key?
how many sql ddl commands are supported by 'mysql'? : Sql dba
How do you explain an index number?
what is the difference between join and union? : Sql dba