获得库每个表的记录数和容量,sp_msforeachtable是MS未公开的存储过程

MSSQL:获得库每个表的记录数和容量

sp_msforeachtable是MS未公开的存储过程:

exec sp_msforeachtable @command1="print '?'",@command2="sp_spaceused '?'",@command3= "select count(*) from ? "

原文地址:https://www.cnblogs.com/LCX/p/1141577.html