MSSQL:获得库每个表的记录数和容量 sp_msforeachtable是MS未公开的存储过程:
exec sp_msforeachtable @command1="print '?'",@command2="sp_spaceused '?'",@command3= "select count(*) from ? "