Returns an estimate of the number of rows in the specified table.
rowcnt(sysindexes.doampg)
is the row count maintained in sysindexes.
select name, rowcnt(sysindexes.doampg) from sysindexes where name in (select name from sysobjects where type = "U")
name ------------------------------ ----------- roysched 87 salesdetail 116 stores 7 discounts 4 au_pix 0 blurbs 6
rowcnt, a system function, returns the estimated number of rows in a table.
The value returned by rowcnt can vary unexpectedly when Adaptive Server reboots and recovers transactions. The value is most accurate after running one of the following commands:
For general information about system functions, see “System functions”.
ANSI SQL – Compliance level: Transact-SQL extension
Any user can execute rowcnt.
Catalog stored procedures sp_statistics
Commands dbcc, update all statistics, update statistics
Function data_pgs
System procedures sp_helpartition, sp_spaceused