if object_id('tempdb..#Tab') is not null
drop table #Tab
CREATE TABLE #Tab (NAME nvarchar(100),ROWS char(20),reserved varchar(18) ,Data varchar(18) ,index_size varchar(18) ,Unused varchar(18) )
GO
INSERT #Tab EXEC SP_MSFOREACHTABLE 'EXEC sp_spaceused "?"'
SELECT * FROM #Tab ORDER BY ROWS DESC;