一:SQL SERVER 使用以下SQL  

 

declare @table_spaceused table
(name nvarchar(100)
,rows int
,reserved nvarchar(100)
,data nvarchar(100)
,index_size nvarchar(100)
,unused nvarchar(100)
)


insert into @table_spaceused
(name,rows,reserved,data,index_size,unused )
exec sp_MSforeachtable
@command1='exec sp_spaceused ''?'''

select * from @table_spaceused

 

二:MYSQL 使用以下SQL  

use information_schema;
select table_name,table_rows from tables
where TABLE_SCHEMA = 'wyn'
order by table_rows desc;

 

posted on 2019-03-11 10:26  黄衍仕  阅读(512)  评论(0编辑  收藏  举报