To know the size of a column...Help

  • Hi,

    Could u pls tell me how can i get the total size of a column in my table ?

    ex. Table Document ( col1, col2)

    i need to know the total size of col1...

    tks

  • exec sp_help tablename

  • For detailed informations on select cluause you can use a syscolumns together as sysobjects.

    Lets try.

     

     

     


    Hildevan O Bezerra

  • Depends on what you are after.

    select datalength(col1) from document

    Will return the actual length in bytes of each individual row.

    select sum(datalength(col1)) from document

    Will return the total bytes used by that column in all rows.

    select col_length('document', 'col1')

    Will return the defined length for the column.

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

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