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 are the different types of columns types constraints in the sql server?

1008


What is the architecture of ms sql reporting service?

920


Can you pass expressions to function parameters?

1031


How to write a query with an inner join in ms sql server?

997


Define msdb database?

973


Is profiler the only tool that has the ability to audit and identify ddl events? : sql server security

1011


What is difference between views and stored procedures?

928


what are defaults? : Sql server database administration

1005


Explain the different types of backups available in sql server? : sql server database administration

863


Name 3 ways to get an accurate count of the number of records in a table?

965


Can a rule be bound to any column of any data type?

911


What are the dis_advantages of stored procedures, triggers, indexes?

2171


How can sql server instances be hidden?

894


How to insert data with null values?

970


What is meant by referential integrity?

957