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

What is BCP? When does it used in sql server 2012?

1065


What is field in algebra?

1038


What is clustered vs nonclustered index?

948


What is normalization according to you and explain its different levels?

953


What are the lambda triggers?

913


What are system databases in ms sql server?

1062


Is truncate autocommit?

941


What is the need for indexing?

953


how can u get last observation in an unknown dataset ?

2436


Explain mixed authentication mode of sql server?

1066


What number aggregate functions are accessible there in sql?

1075


What do you understand by integration services in sql server?

965


Explain the difference between delete,drop and truncate in SQL Server?

1103


How do you identify a foreign key?

1030


What is rs.exe utility?

156