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 are the types of variable use in pl sql?
What is a file delimiter?
Explain the types of joins in sql?
Why select is used in sql?
How do I view a procedure in sql?
What schema means?
what is uncommittable transactions? : Transact sql
What are the different types of functions in sql?
how to do backup entire database? : Transact sql
GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?
Is mariadb nosql?
What is microsoft t sql?
how do you login to mysql using unix shell? : Sql dba
How do I debug a stored procedure?
What is trigger in sql? Explain