如何修复“为列调整的值超出范围"错误?

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"?

这篇关于如何修复“为列调整的值超出范围"错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)