Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2006
    Posts
    39

    Unanswered: how do i calculate the average variable length for a varchar?

    im trying to learn how to calculate table size.
    i understand some of it, but im stuck at calculating the varchars

    Ex. i have 2 varchar columns
    - varchar(50)
    - varchar(100)

    i'm suppose to find the average length for them?

    i'm suppose to use that to add up to my ROW SIZE

    and also after i got the average, do i add 2 for variable columns overhead and another 2 for Row pointer in row offset array

    please help me asap before 2morrow night.
    Thanks!
    i have a test

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Interesting homework assignment...

    You know there are both functions (which can be found in books online) for calculating the length of a field and aggregating an average.


    George
    Home | Blog

  3. #3
    Join Date
    Oct 2006
    Posts
    39
    i think i got it
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •