[SQL]获取数据库所有表行数占用

获取数据库所有行数占用,闲话少说上码。

	SELECT a.name 名 , b.rows 记录数 ,rtrim(8*b.dpages)+'Kb' 占用,
	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 a.name,b.rows DESC
分享到:

评论已关闭。