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
How do you remove duplicates without using distinct in sql?
What is trigger and types?
Is record in pl sql?
what is the command used to fetch first 5 characters of the string? : Sql dba
What are stored procedures in mysql?
What is a recursive join sql?
Is grant a ddl statement?
Why indexing is needed?
Why is sharding used?
Is join same as left join?
How do I install sql?
What is the usage of sql functions?
What is the purpose of the sql select top clause?
How do you declare a user-defined exception?
how many tables will create when we create table, what are they? : Sql dba