How to count the no of records of a table without using
COUNT function?
Answer Posted / senthil kumar
Hi Ramaprasad 'select max(rownum) from emp; ' this is passible
but
declare
cursor c1(dpno emp.deptno%type)is select * from emp where
deptno=dpno;
i c1%rowtype;
begin
open c1(dpno);
loop
fetch c1 into i ;
exit when c1%notfound;
dbms_output.put_line(c1%rowcount);
end loop;
close c1;
end;
this is NOT Passible , because this one just show all records Not count it.......
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Does inner join return duplicate rows?
What is recursive stored procedure?
what is a materialized view? : Sql dba
Explain architecture of sql server notification services?
Does sql profiler affect performance?
write an sql query to get third maximum salary of an employee from a table named employee_table. : Sql dba
What are the three forms of normalization?
What is nested table in pl sql?
Can we create view in stored procedure?
What is case function?
What is the difference between cluster and non-cluster index?
Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me
What is keys and its types?
What are the different types of database management systems?
What is your daily office routine?