MySQL错误1264:列超出范围值

编程入门 行业动态 更新时间:2024-10-26 18:29:18
本文介绍了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:列超出范围值

本文发布于:2023-10-18 10:34:32,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1503978.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   MySQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!