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 do you find the number of rows in a table?

Answer Posted / manoj savalia

Try This

SELECT SYS_OBJ.NAME AS "TABLE NAME"
, SYS_INDX.ROWCNT AS "ROW COUNT"
FROM SYSOBJECTS SYS_OBJ, SYSINDEXES SYS_INDX
WHERE SYS_INDX.ID = SYS_OBJ.ID
AND INDID IN(0,1)
AND XTYPE = 'U'
AND SYS_OBJ.NAME <> 'SYSDIAGRAMS'
AND SYS_INDX.ROWCNT>0
ORDER BY SYS_INDX.rowcnt DESC

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to achieve Paging of records in SQL SERVER?

1056


Can foreign key be duplicate?

1006


How to make conditional sum in ssrs?

175


Explain iaas, paas and saas?

90


what do you understand by change data capture?

951


Explain indexed views and partitioned view with their syntax.

1100


What are the differences between substr and charindex in sql server.

1034


What are system databases into sql server (2005/2008) : sql server database administration

973


Is it safe to delete log files?

875


How is SQL Azure different than SQL server?

223


What is the use of attributehierarchyvisible ? : sql server analysis services, ssas

1028


what are constraints? : Sql server database administration

995


What is raid and what are different types of raid levels?

1095


Write a sql query to sort on different column name according to the parameters passed in the function?

857


what method you can use to reduce the overhead of Reporting Services data sources?

242