其实只要使用系统内置的存储过程sp_spaceused就可以得到表的相关信息 如:sp_spaceused 'tablename' 以下是为了方便写的一个存储过程,目的是把当前的所有表的相关信息全部都保存在一个指定的表里面 CREATE PROCEDURE get_tableinfo AS if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tablespaceinfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) cr...
[ 查看全文 ]