Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How can I total the records count in each table

Author  Topic 

davidlaw
Starting Member

2 Posts

Posted - 2005-07-28 : 03:21:38
Now I'm studying the performance of our ERP, and I want to write a script or query to have the system to print out the records count in each table in a database, the format should be as below:

Table Name Record Counts

I have tried it for times, but I failed.

There is a system table named sysobjects, I can print out all the tables by usign the below query:

select [name] from sysobjects where xtype='U'

But I hope to generate a query to have the system to give the records in each table.

How to realize it?

Thanks you in advance!!!


madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-07-28 : 03:33:52
Refer this
http://www.mindsdoor.net/SQLTsql/sp_GetRowsForAllTables.html

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

davidlaw
Starting Member

2 Posts

Posted - 2005-07-28 : 03:36:01
quote:
Originally posted by madhivanan

Refer this
http://www.mindsdoor.net/SQLTsql/sp_GetRowsForAllTables.html

Madhivanan

Failing to plan is Planning to fail



Many Thanks, It is what I wanted!!
Go to Top of Page
   

- Advertisement -