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 2005 Forums
 SQL Server Administration (2005)
 Need to find which table stored the huge row

Author  Topic 

wkm1925
Posting Yak Master

207 Posts

Posted - 2010-11-25 : 00:47:55
Hi,

I've database named WMS. In this WMS, there's 98 tables.

How to find which table hold the huge row?

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-11-25 : 04:23:38
Do you mean the number of columns or amount of data or a single large row?
For data run sp_spaceused on each table to see the size
For number of columns look at information_schema.columns for the greatest ordinal_position
For a single row - more complicated


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-11-26 : 10:04:21
select top 1 object_name(id) as table_name,rows from sysindexes where indid<2
order by 1 desc


Madhivanan

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

- Advertisement -