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

What are different types of sql?

1266


What do you think about pl/sql?

1126


what are the differences among rownum, rank and dense_rank? : Sql dba

1087


What are the different types of database management systems?

1037


Explain how exception handling is done in advance pl/sql?

1047


what are the 'mysql' command line options? : Sql dba

1135


If a cursor is open, how can we find in a pl/sql block?

1216


How do I send sql query results to excel?

1113


Which are the different types of indexes in sql?

1102


What is a heap in sql?

1148


What are different joins used in sql?

1107


how can we destroy the cookie? : Sql dba

1082


what are the disadvantages of mysql? : Sql dba

1210


Is the primary key an index?

1080


What is group function in sql?

1067