65.9K
CodeProject is changing. Read more.
Home

A better way to count(*)

starIconstarIconstarIconstarIconstarIcon

5.00/5 (3 votes)

Jun 8, 2010

CPOL
viewsIcon

7441

Or, assuming your table has an index, you could do this "old-school" as:select MAX(rows) from sysindexes where id = Object_ID('{tablename}')

Or, assuming your table has an index, you could do this "old-school" as: select MAX(rows) from sysindexes where id = Object_ID('{tablename}')