What does INT(5) in mysql mean?

前端 未结 7 474
孤独总比滥情好
孤独总比滥情好 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:09

    An int can be between -2147483648 and 2147483647 signed, or 0 and 4294967295 unsigned.

    Thats why it was cut down to that if you entered a number larger than it as a signed value

提交回复
热议问题