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
What are pl sql procedures?
what is error ora-03113: end-of-file on communication channel?
what is 'mysqlcheck'? : Sql dba
What is the difference between joins?
What is implicit cursor in pl sql?
what is a stored procedure? : Sql dba
Write a sql query to find the names of employees that begin with ‘a’?
What is the difference between join and natural join?
Why do we use sql constraints?
Why do you partition data?
Advantages and disadvantages of stored procedure?
Why do we create stored procedures & functions in pl/sql and how are they different?
how can we encrypt and decrypt a data present in a mysql table using mysql? : Sql dba
What are the types of queries in sql?
what is the difference between ereg_replace() and eregi_replace()? : Sql dba