您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

当列为INT(10)时为什么不能插入10位数字

当列为INT(10)时为什么不能插入10位数字

Int具有最大值范围:

INT 4   -2147483648 2147483647
        0   4294967295 (unsigned )

因此,由于溢出,您将获得最大值。使用bigint代替,它有8个字节,您会没事的。

http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html#integer- types

BIGINT  8   -9223372036854775808    9223372036854775807
          0                 18446744073709551615
其他 2022/1/1 18:31:57 有526人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶