运维网's Archiver
论坛
›
SQL Server
› 统计Sql Server数据库中的每张表的记录数
hdfg
发表于 2015-8-12 09:08:55
统计Sql Server数据库中的每张表的记录数
统计Sql Server数据库中的每张表的记录数
USE JYDB -- JYDB为你所在的数据库
GO
select b. '表名',max(a.rowcnt) '记录数'
from sysindexes a
join sys.objects b on b.object_id=a.id
where b.type='U'
group by b.
页:
[1]
查看完整版本:
统计Sql Server数据库中的每张表的记录数