Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004
    Posts
    28

    Unanswered: Integer datatype question

    I have a column setup using the Int datatype and a length of 4. First: does this mean that the allowable range is from -9999 to 9999? Second: I can't seem to change the 4 to anything else, how can I modify the length

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    That's the internaly stored length...

    Look up datatypes in books online...

    int is actually

    Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 - 1 (2,147,483,647).
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Feb 2004
    Posts
    492
    no, the 4 indicates the amount of bytes used. It's a fixed size, you can't change it. As specified by BOL, integer values '(...)from -2^63 (-9,223,372,036,854,775,808) through 2^63-1 (9,223,372,036,854,775,807).'. If this won't do use a bigint instead.

    EDIT: Brett, I'll quote you on this: Damn...sniped again
    Last edited by Kaiowas; 06-04-04 at 12:57.

Posting Permissions

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