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 transaction control language (tcl)?
What is posting?
Is mariadb a nosql database?
how to use regular expression in pattern match conditions? : Sql dba
What is the difference between distinct and unique in sql?
Is there a way to automate sql execution from the command-line, batch job or shell script?
What is sql in oracle?
How many types of keys are there in sql?
what are set operators in sql? : Sql dba
How can we debug in PL/SQL?
What is rank () in sql?
how many sql ddl commands are supported by 'mysql'? : Sql dba
Can we rollback truncate?
how to calculate expressions with sql statements? : Sql dba
What is form and report?