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 specify the collation for a character data type in ms sql server?

1089


What are the different acid properties?

1122


How to execute a stored procedure in ms sql server?

1255


What is transaction server explicit transaction?

1089


Is it possible for a stored procedure to call itself or recursive stored procedure?

1006


What is use of except clause? How does it differ from not in clause?

1069


What is the default Port No on which SQL Server listens?

1178


Explain ms sql server reporting services vs crystal reports?

975


How to include date and time values in sql statements?

1144


What happens if null values are involved in boolean operations?

1047


What area unit the various kinds of info compression introduced in sql server 2008?

1141


Explain features of analysis services?

1082


Can a cursor be updated? If yes, how you can protect which columns are updated?

1176


Your company has 50 branches all over the country all the branches, including the head office have sql server as the database every night all 50 branches upload certain information to the head office which replication topology is best suited for the above scenario?

1192


What is sql stored procedure?

1150