首页 > 数据库技术 > 详细

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

时间:2016-05-24 13:32:50      阅读:205      评论:0      收藏:0      [点我收藏+]

SqlAzure中的方式:

select 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中的每个表数据行数

原文:http://www.cnblogs.com/dupeng0811/p/5522985.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!