统计SQL2005中数据库中的每张表的记录数
博客分类: SQL
刚刚需要用到的,记录一下,SQL05以上管用,2000没试过。。。
Sql代码 收藏代码
select
b.[
name
] 表名,
max
(a.rowcnt) 记录数
from
sysindexes a
join
sys.objects b
on
b.object_id=a.id
where
b.type=
'U'
group
by
]