Row size in bytes

  • Hi, dear

    Is there a faster way to get the row size of tables in bytes?

    Thank you very much.

    Obede

    Brazil

  • One way to find this information is:

     

    DBCC SHOWCONTIG (Table_Name) WITH TABLERESULTS


    Kindest Regards,

    Roi Assa

  • This will get the maximum possible rowsize for the employees table in the pubs database:

    select sum(sc.length)

    from sysobjects so

     join syscolumns sc on so.id = sc.id

    where so.name = 'employee'

     and so.xtype = 'U'

    This is not the maximum actual row length, but the maximum possible (i.e. every varchar column is maxed out in the row).

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

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