Row count of all tables

  • The following query also gives the same results without creating a table.

    select

    TableName = object_name(id),

    [RowCount] = max(rows)

    from sysindexes

    group by id

  • This works only if the stats are up to table. It's ok if an estimate is all you need. However if you need accuracy, you need to use count(*).

Viewing 2 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply