Results 1 to 3 of 3

Thread: Size of column.

  1. #1
    Join Date
    Feb 2003
    Location
    Calgary, Alberta.
    Posts
    11

    Unanswered: Size of column.

    Hi,

    I just wonder what size a column should be for:

    1) DECIMAL(17,7) : Is this 17 bytes? or does this give 17/2 + 1? then, is it going to be 9 bytes or 10 bytes?

    2) TIMESTAMP: how big is this data type?

    I am using DB2e for embedded Visual C++.

    Thanks.

  2. #2
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi,

    These are the sizes in DB2 7.1. Hope this may help you.

    For Decimal (p, s) size in bytes is p/2 + 1.

    For Timestamp it is 10 bytes.

    -Prashant
    Prashant

  3. #3
    Join Date
    Dec 2002
    Posts
    134
    And do not forget to add 1 byte for nullable columns

    dmitri

Posting Permissions

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