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

How to return multiple rows from the stored procedure?

970


Can we use ddl commands in pl sql?

1162


explain what is mysql? : Sql dba

1082


How to select 10 records from a table?

1157


What are the types of dbms?

975


What is pivot query?

1073


What can you do with pl sql?

1095


Is inner join faster than left join?

1190


How can I delete duplicate rows?

1018


How do I partition a table in sql?

1132


Is vs as in pl sql?

987


What are stuff and replace function?

1084


What is sqlservr exe?

978


how to use in conditions? : Sql dba

1013


Is sql better than access?

1018