• Todd Engen (4/8/2008)


    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.

    Or - right-click on the database, Reports, Standard Reports, Disk Usage by Table (it also includes the record counts and then some).

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?