How do I fix the #39;Out of range value adjusted for column#39; error?(如何修复“为列调整的值超出范围错误?)
问题描述
我进入 phpMyAdmin 并将整数 (15) 字段的值更改为 10 位数字,因此一切正常.我输入了值4085628851"并收到以下错误:
I went into phpMyAdmin and changed the value for an integer(15)field to a 10-digit number, so everything should work fine. I entered the value '4085628851' and I am receiving the following error:
警告:#1264 超出范围值针对第 1 行的电话"列进行了调整
Warning: #1264 Out of range value adjusted for column 'phone' at row 1
然后将值更改为2147483647".
It then changes the value to '2147483647'.
经过一番谷歌搜索,我发现这篇文章解释了如何解决这个问题.http://webomania.wordpress.com/2006/10/01/out-of-range-value-adjusted-for-column-error/,但我不知道如何登录 Mysql shell.
After some googling, I found this article that explains how to fix the problem. http://webomania.wordpress.com/2006/10/01/out-of-range-value-adjusted-for-column-error/, but I don't know how to login to the Mysql shell.
如何登录 Mysql shell?如何解决此错误?
How do I login to the Mysql shell? How do I fix this error?
推荐答案
您尝试设置的值对于带符号的 INT
字段来说太大.显示宽度(15)
不影响可存储值的范围,只影响值的显示方式.
The value you were trying to set is too large for a signed INT
field. The display width (15)
does not affect the range of values that can be stored, only how the value is displayed.
参考:关于数字的 MySQL 文档
关于电话号码 - 请参阅 以某种规范格式存储电话号码还是按输入"存储电话号码更好?
On phone numbers - see Is it better to store telephone numbers in some canonical format or "as entered"?
这篇关于如何修复“为列调整的值超出范围"错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何修复“为列调整的值超出范围"错误?


基础教程推荐
- oracle区分大小写的原因? 2021-01-01
- 在多列上分布任意行 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01