mssql 统计一个数据库中所有表记录的数量 20
如题,比如我建立一个名叫school数据库,里面有100多个表,我想准确的获取到表的数量,应该如何查询...
如题,比如我建立一个名叫school数据库,里面有100多个表,我想准确的获取到表的数量,应该如何查询
展开
2个回答
展开全部
SELECT a.name, b.rows FROM sysobjects AS a
INNER JOIN sysindexes AS b ON a.id = b.id
WHERE (a.type = 'u') AND (b.indid IN (0, 1))
ORDER BY b.rows DESC
INNER JOIN sysindexes AS b ON a.id = b.id
WHERE (a.type = 'u') AND (b.indid IN (0, 1))
ORDER BY b.rows DESC
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询