[sqlserver]超大单表快速查询总行数(历史数据)

use [database]

select schema_name(t.schema_id) as [Schema], t.name as TableName,i.rows as [RowCount]

from sys.tables as t, sysindexes as i

where t.object_id = i.id and i.indid <=1



你可能感兴趣的:([sqlserver]超大单表快速查询总行数(历史数据))