查询数据库里各个表的记录总数,占用空间数:


Warning: Undefined array key "HTTP_REFERER" in /www/wwwroot/prod/www.enjoyasp.net/wp-content/plugins/google-highlight/google-hilite.php on line 58

select b.name,a.rowcnt from sysindexes a,sysobjects b
where a.id=b.id and a.indid<=2 and b.xtype='u' rowcnt bigint 基于 indid = 0 和 indid = 1 的数据级行计数。 故用a.indid <= 2 单个表记录数,占用空间数:sp_spaceused 'bdorder' 数据库所有表各个记录数,占用空间数: EXEC sp_MSforeachtable @command1="sp_spaceused '?'"