What does INT(5) in mysql mean?

前端 未结 7 414
孤独总比滥情好
孤独总比滥情好 2020-12-29 18:27

I always thought INT(5) means a number which has a max size of 5 digits. I tried entering a huge number inside it and it somehow got cut down to 2147483647

This obvi

相关标签:
7条回答
  • 2020-12-29 19:32

    https://alexander.kirk.at/2007/08/24/what-does-size-in-intsize-of-mysql-mean/
    M indicates the maximum display width for integer types. For floating-point and fixed-point types, M is the total number of digits that can be stored. For string types, M is the maximum length. The maximum allowable value of M depends on the data type.

    0 讨论(0)
提交回复
热议问题