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

Difference between aggregate functions of sql?

1080


Explain about SQLOS?

986


How to connect to SQL Azure Database by using sqlcmd?

136


Explain query editor regions

1030


Explain filtered indexes?

974


How sql server executes a statement with nested subqueries?

1010


How to list all stored procedures in the current database using ms sql server?

1111


What are the types of database schema? : sql server analysis services, ssas

1107


Which database stores information about replication?

1036


How to defragment table indexes?

965


How to create a stored procedure with a statement block in ms sql server?

1044


what is unique and xaml nonclustered index

1030


What is the use of custom fields in report?

983


Suppose you want to implement the one-to-one relationships while designing tables. How would you do it?

942


What is the difference between an index and a unique index?

985