在 SQL Server 2008 中查询某个数据库内的所有表的记录行数
SELECT OBJECT_NAME(ii.id) TableName ,
rows
FROM sysindexes ii
INNER JOIN sysobjects oo ON ( oo.id = ii.id
AND oo.xtype = 'U '
)
WHERE ii.indid < 2
ORDER BY TableName;
SELECT OBJECT_NAME(ii.id) TableName ,
rows
FROM sysindexes ii
INNER JOIN sysobjects oo ON ( oo.id = ii.id
AND oo.xtype = 'U '
)
WHERE ii.indid < 2
ORDER BY TableName;