CREATE TABLE #tableSizeInfo
(
[tablename] varchar(255),
[rows] bigint,
[reserved] varchar(255),
[data] varchar(255),
[index_size] varchar(255),
[unused] varchar(255)
)
EXEC sp_MSForEachTable
'INSERT INTO #tableSizeInfo EXECUTE sp_spaceused [?];'
SELECT * FROM #tableSizeInfo
DROP TABLE #tableSizeInfo
(
[tablename] varchar(255),
[rows] bigint,
[reserved] varchar(255),
[data] varchar(255),
[index_size] varchar(255),
[unused] varchar(255)
)
EXEC sp_MSForEachTable
'INSERT INTO #tableSizeInfo EXECUTE sp_spaceused [?];'
SELECT * FROM #tableSizeInfo
DROP TABLE #tableSizeInfo
Comments
Post a Comment