获取数据库所有表行数占用,闲话少说上码。 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
获取数据库所有表行数占用,闲话少说上码。 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
登录 |