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 |
JeffS23
Posting Yak Master
212 Posts |
Posted - 2007-12-27 : 12:23:17
|
How do I export or create a list of the SQL table sizes. I need to know what tables have data in them.What is the best way to do this? |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2007-12-27 : 12:44:26
|
select object_name(id), rows from sysindexes where id <= 1==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
JeffS23
Posting Yak Master
212 Posts |
Posted - 2007-12-28 : 12:34:15
|
Your script just told me how many tables had data in them. I need to know what tables have data in them, and I don't really care how much data. Do you have something that will tell me what I need to know? |
 |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2007-12-28 : 12:47:09
|
I think he meant this:select object_name(id), rows from sysindexes where indid <= 1you can leave off the [rows] column if you don't care for that info.Be One with the OptimizerTG |
 |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
|
|
|
|