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
What is bind reference and how can it be created?
how to calculate expressions with sql statements? : Sql dba
Why truncate is used in sql?
What is package in pl sql?
Can a foreign key be null?
How can check sql version from command line?
What is indexing in sql and its types?
What is a string data type in sql?
What is dialect in sql?
What is parameter substitution in sql?
Can a view be mutating? If yes, then how?
How to read xml file in oracle pl sql?
Is primary key always clustered index?
how to convert character strings to numeric values? : Sql dba
What is pl sql code?