Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can you inner join the same table?

931


What is pl sql quora?

1070


How many types of indexes are there in sql?

932


Is clustered index a primary key?

881


Can a procedure in a package be overloaded?

981


How do you declare a variable in pl sql?

964


How to get unique records from a table?

896


Define union, minus, union all, intersect ?

949


What is the difference between stored procedure and view?

962


Can a key be both primary and foreign?

943


What is the difference between subquery and correlated query?

986


How do you write a subquery?

960


What does 0 mean in sql?

910


What is primary key and foreign key with example?

869


Is a foreign key always unique?

882