Developping for the translation industry RSS 2.0

 Wednesday, July 02, 2008

This isn’t necessary a critical part of a DBA’s job but, at times, it can be useful to have an idea of how many rows are in your databases.

The simplest way to get it is with this query:

select sum(rowcnt) from sysobjects, sysindexes
where = and sysindexes.indid in (0, 1) and sysobjects.xtype = 'u'

This will get you the sum of rows in the entire database, for users objects only.  If you want the table-by-table breakdown, you can simply add the name of the object in the query:

select, sysindexes.rowcnt from sysobjects, sysindexes
where = and sysindexes.indid in (0, 1) and sysobjects.xtype = 'u'
order by

Wednesday, July 02, 2008 9:43:51 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0] -
Code Snippet | SQL
Comments are closed.

About the author/Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2019
Stanislas Biron
Sign In
Total Posts: 135
This Year: 0
This Month: 0
This Week: 0
Comments: 1
All Content © 2019, Stanislas Biron