How to count the no of records of a table without using
COUNT function?
Answer Posted / ajit
declare
cursor c1
is
select * from emp;
i c1%rowtype;
begin
open c1;
loop
fetch c1 into i ;
exit when c1%notfound;
end loop;
dbms_output.put_line(c1%rowcount);
close c1;
end;
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can we connect to postgresql using sql developer?
What is difference between my sql and sql?
what is query cache in mysql? : Sql dba
What is form and report?
What is the use of procedures?
What is %type in sql?
What is sql*plus?
What is difference between sql function and stored procedure?
what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba
What is sql integrity?
how to fetch alternate records from a table? : Sql dba
Can %notfound return null after a fetch?
What are hotfixes and patches?
what is a record in a database ? : Sql dba
What does := mean in pl sql?