What's the difference in int(11) and int(11) UNSIGNED?

后端 未结 8 689
鱼传尺愫
鱼传尺愫 2020-12-13 08:30

What\'s the difference in int(11) and int(11) UNSIGNED ?

相关标签:
8条回答
  • 2020-12-13 09:17

    UNSIGNED is exactly that, its all positive (no sign) numbers. The size of bytes is the same, but if your data is never negative you can get larger positive numbers out of it. The 11 is the default of how many characters it will fetch and display. For the exact size, do a search for the DBMS you are using and the type.

    0 讨论(0)
  • 2020-12-13 09:18

    An unsigned integer can handle values from 0 to 2^(size in bits of the integer field). A signed integer can handle values from -2^(size of the integer field-1) to 2^(size of the integer field-1)-1.

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