Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004

    Unanswered: question on integer field length allocation

    I was wondering what is the difference between allocating lenght of 4 for an integer (column) and length of 8? I am just trying to understand the reasoning behind it. Any ideas?

    Thanks in advance.

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    unfortunately, this is one of those things that you find in mysql that is really confusing to many people

    there is no "length" to integer datatypes

    INTEGER(4) is the same as INTEGER(11) is the same as INTEGER(937) as far as the range of numbers that it can hold is concerned

    the number in parentheses applies only to the number of digits shown by default when the ZEROFILL option is chosen

    look it up in the docs for more information | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Feb 2004

    question on integer field length allocation

    Thanks for the clarification. it really helps.

    BTW is zero fill is used for banking application (or similar) to fill in zeros to maintain length of fields?

Posting Permissions

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