Create Table #temp ( table_name varchar(200) , database_size int, remarks varchar(50) ) SET NOCOUNT ON insert #temp exec sp_databases select table_name, cast(database_size / 1024 as nvarchar)+ ' KB' from #temp order by database_size desc drop table #tempAn example of what gets shown can bee seen below:-