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
what are the different type of normalization? : Sql dba
Which join is default?
What are database links used for?
What is the difference between cluster and non-cluster index?
What is function and procedure?
explain about mysql and its features. : Sql dba
What is multiple columns?
What is an alias command?
Are there any features that are decommissioned in 11g that are not present in 11g?
How to use sql*plus built-in timers?
Define union, minus, union all, intersect ?
Can we declare a column having number data type and its scale is larger than pricesionex: column_name number(10,100),column_name numbaer(10,-84)
What are some emotional triggers?
discuss about myisam index statistics collection. : Sql dba
What is sql lookup?