SqlAzure中的方式:
select t.name ,s.row_count from sys.tables tjoin sys.dm_db_partition_stats sON t.object_id = s.object_idand t.type_desc = 'USER_TABLE'and t.name not like '%dss%'and s.index_id = 1order by row_count desc
SQLServer的方式:
select a.name as '表名',b.rows as '表数据行数'from sysobjects a inner join sysindexes bon a.id = b.idwhere a.type = 'u'and b.indid in (0,1)--and a.name not like 't%'order by b.rows desc