sp_spaceused

  • Could someone please share how to dunp sp_spaceused stored procedure output values to a table for reporting purpose?

  • CREATE TABLE #test(

    [name] varchar(100),

    rows int,

    reserved varchar(100),

    data varchar(100),

    index_size varchar(100),

    unused varchar(100)

    )

    INSERT #test

    EXEC sp_spaceused 'tablename'

    SELECT * FROM #test

    DROP TABLE #test

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

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