rowcnt

Description

Returns an estimate of the number of rows in the specified table.

Syntax

rowcnt(sysindexes.doampg)

Parameters

sysindexes.doampg

is the row count maintained in sysindexes.

Examples

Example 1

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

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension

Permissions

Any user can execute rowcnt.

See also

Catalog stored procedures sp_statistics

Commands dbcc, update all statistics, update statistics

Function data_pgs

System procedures sp_helpartition, sp_spaceused