SELECT object_name (i.id) TableName, rows as rows FROM sysindexes i INNER JOIN sysObjects o ON (o.id = i.id AND o.xType = 'U ') WHERE indid < 2 ORDER BY rows desc
所有列名,列名所在表名
select name,OBJECT_NAME(id)from syscolumns
所有存储过程
SELECT * FROM sysobjects where type='P' order by crdate desc