当前位置:Gxlcms > 数据库问题 > 查看SqlAzure和SQLServer中的每个表数据行数

查看SqlAzure和SQLServer中的每个表数据行数

时间:2021-07-01 10:21:17 帮助过:14人阅读

t.name ,s.row_count from sys.tables t join sys.dm_db_partition_stats s ON t.object_id = s.object_id and t.type_desc = USER_TABLE and t.name not like %dss% and s.index_id = 1 order by row_count desc

 SQLServer的方式:

select  a.name as 表名,b.rows as 表数据行数
from sysobjects a inner join sysindexes b
on a.id = b.id
where   a.type = u
and b.indid in (0,1)
--and a.name not like ‘t%‘
order by b.rows desc

 

查看SqlAzure和SQLServer中的每个表数据行数

标签:

人气教程排行