Goodspeed

导航

统计

公告

获取表的记录行数

SELECT t.name,p.rows FROM sys.indexes AS i
INNER JOIN sys.tables AS t ON i.object_id = t.object_id
join sys.partitions p with(nolock) on i.object_id = p.object_id AND i.index_id = p.index_id
WHERE i.type_desc = 'CLUSTERED'
ORDER BY p.rows

posted on 2007-12-28 15:26 Goodspeed 阅读(383) 评论(0) 编辑 收藏