How to count the no of records of a table without using
COUNT function?
Answer Posted / ramaprasad
select rownum from emp;
select max(rownum) from emp;
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;
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
How to return multiple rows from the stored procedure?
Can we use ddl commands in pl sql?
explain what is mysql? : Sql dba
How to select 10 records from a table?
What are the types of dbms?
What is pivot query?
What can you do with pl sql?
Is inner join faster than left join?
How can I delete duplicate rows?
How do I partition a table in sql?
Is vs as in pl sql?
What are stuff and replace function?
What is sqlservr exe?
how to use in conditions? : Sql dba
Is sql better than access?