Hi All,
This code will helps you to get the count of entries in each table in a DB in SQL:
- SELECT
- sysobjects.Name
- , sysindexes.Rows
- FROM
- sysobjects
- INNER JOIN sysindexes
- ON sysobjects.id = sysindexes.id
- WHERE
- type = 'U'
- AND sysindexes.IndId < 2
- ORDER BY
- sysobjects.Name
-
- SELECT
- sum(sysindexes.Rows),GETDATE()
- FROM
- sysobjects
- INNER JOIN sysindexes
- ON sysobjects.id = sysindexes.id
- WHERE
- type = 'U'
- AND sysindexes.IndId < 2
Kindest Regards
Sibeesh