rowcnt( doampg )
Returns the number of rows in a table, without scanning the entire table; instead, the row count is retrieved from the table’s OAM page.
Example
select rowcnt( doampg )
from sysindexes
where id = object_id( 'T_ProdBillOfMat' )
and indid < 2
-- use the unordered table (indid = 0) or the clustered index (indid = 1)