MySQL错误1264:列超出范围值 [英] MySQL Error 1264: out of range value for column

查看:1196
本文介绍了MySQL错误1264:列超出范围值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MySQL中的表中 SET cust_fax如下:

As I SET cust_fax in a table in MySQL like this:

cust_fax integer(10) NOT NULL,

然后我插入这样的值:

INSERT INTO database values ('3172978990');

然后它说


`错误1264`超出列值

`error 1264` out of value for column

我想知道错误在哪里?我的套装?或其他?

And I want to know where the error is? My set? Or other?

任何答案都将不胜感激!

Any answer will be appreciated!

推荐答案

integer 3172978990大于2147483647,因此错误**。

The integer 3172978990 is greater than 2147483647, hence the error**.

要修复错误,请将数据类型更改为 VARCHAR 。电话,传真等应存储为字符串。请参阅此讨论

To fix the error, change your datatype to VARCHAR. Phone, Fax etc. should be stored as strings. See this discussion.

** 这是一个图表,告诉你哪个整数类型可以存储什么值。

** Here is a chart that tells you which integer type can store what values.

这篇关于MySQL错误1264:列超出范围值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆