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"?
这篇关于如何修复“为列调整的值超出范围"错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何修复“为列调整的值超出范围"错误?
基础教程推荐
- 带有WHERE子句的LAG()函数 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- 带更新的 sqlite CTE 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
