2.从sys.sysindexes中获取。其中也有一个列为rowcnt,Counts the total number of inserted, deleted, or updated rows since the last time statistics were updated for the table
使用下面的语句:
---replace the tablename when you use this script
select id,object_name(id) as tableName,indid,rows,rowcnt
from sys.sysindexes where id =object_id('tablename') and indid in(0,1)