create proc [pro_data] @MinRows int=500
as
begin
create table #tmp (name varchar(50),rows int,reserved varchar(50),data varchar(50),index_size varchar(50),unused varchar(50));
insert into #tmp (name,rows,reserved,data,index_size,unused) exec sp_msforeachTable "sp_spaceused '?'"
select * from #tmp where rows>@MinRows order by rows desc
drop table #tmp
declare @sql nvarchar(max)
set @sql='select top '+cast(@MinRows as nvarchar(50))+' ''?''=''?'',* from ?'
exec sp_msforeachtable @sql
end