Home Forums SQL Server 2005 Administering Total records RE: Total records
Todd Engen
SSCrazy Eights
Points: 9869
More actions
April 8, 2008 at 2:06 pm
#800003
Here's one simple way to do that. Just copy-and-paste the results into another query window.
USE MyDatabase
SELECT 'SELECT COUNT(*), ''' + name + ''' FROM ' + name FROM sys.tables
Or you could look at using the stored procedure sp_MSforeachtable.