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 |
|
lemondash
Posting Yak Master
159 Posts |
Posted - 2005-04-22 : 05:00:59
|
| Guys have a database with loads of tables some that are in use and some are old. I'm going through them one by one. Is there a way that i can extact the list in to excel(i can do that bit) but i also want the table size data as well. |
|
|
mwjdavidson
Aged Yak Warrior
735 Posts |
Posted - 2005-04-22 : 06:30:07
|
Not sure what table size info you want, but try something along these lines:SELECT so.name, si.rowcntFROM sysobjects AS so JOIN sysindexes AS si ON so.id = si.idWHERE so.xtype = 'u' AND si.indid in (0, 1)ORDER BY so.name Mark |
 |
|
|
lemondash
Posting Yak Master
159 Posts |
Posted - 2005-04-22 : 08:07:56
|
| Thats cool but i need the size as in KB |
 |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2005-04-22 : 09:32:06
|
| Look at sp_spaceused-------Moo. :) |
 |
|
|
|
|
|