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.
| Author |
Topic |
|
gokhan
Starting Member
3 Posts |
Posted - 2006-05-11 : 07:33:34
|
| I have 97 tables in my database. I want to print table name plus the number of records of this table. Format is like:************************table name records---------- -------table1 3table2 5table3 0....table97 0************************What is the easiest way of this?Thanks... |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-05-11 : 07:35:59
|
| http://www.databasejournal.com/scripts/print.php/1450801 perhaps?Kristen |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-05-11 : 07:52:33
|
| After you run DBCC UpdateUsage command trySelect object_name(id) as table_name, rows from sysindexes where indid<2 order by 1MadhivananFailing to plan is Planning to fail |
 |
|
|
gokhan
Starting Member
3 Posts |
Posted - 2006-05-11 : 07:54:37
|
| working perfect! thank you very much Kristen... |
 |
|
|
gokhan
Starting Member
3 Posts |
Posted - 2006-05-11 : 08:09:08
|
quote: Originally posted by madhivanan After you run DBCC UpdateUsage command trySelect object_name(id) as table_name, rows from sysindexes where indid<2 order by 1MadhivananFailing to plan is Planning to fail
Thank you very much madhivanan, simple and works great! |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-05-11 : 08:14:49
|
| You ought to run DBCC UpdateUsage before using the code in the link I provided too - as I don't think it is included, and without it the figures may be a little stale.Kristen |
 |
|
|
|
|
|