如何解决mysql错误 Out of range value for column ‘xxx‘ at row 1呢?

这个错误,从字面意思来看是我们要放的值超过了长度,所以才会报这个错误,我遇到这个错误好几次都是在线上遇到的。刚开始一直很纳闷,因为自己查看还没有大到超过我设定的长度,这里我默认超过长度一定是因为 太大了, 其实也有可能是太小了,比如我这几次遇到的。就是因为数据库设定的是bigint,但是实际业务在流传中,导致赋予的值变成了负数,也就是把一个负数赋值给一个bigint类型的字段,所以报的这个错误。

planDetail.setDoingQuantity(planDetail.getDoingQuantity() - detail.getQuantity());

我的微信号:xiang20200106 ,欢迎大家找我聊天

— 【 THE END 】—

在这里插入图片描述

本公众号已经整理一套包含前端和后端的全套电子书教程,限时免费赠送,请在公众号里回复「电子书」获取!
🚀 分播机数据同步服务已启动... 🔍 开始检查分播机 Line1 (192.168.110.56)... ✅ 分播机 Line1 (192.168.110.56) 网络通畅 ✅ 分播机 Line1 的数据库文件正常: Y:\sorting.db [TRUNCATE] 表 AI_AppOperationLogs 删除了 0 条 creationtime >= '2025-09-18 06:36:32' 的记录,最小ID=None ✅ 成功清理表 AI_AppOperationLogs 最近3小时数据 📥 从 AppOperationLogs 读取到 5300 条数据 [ERROR] 同步表 AppOperationLogs 时发生异常: 1264 (22003): Out of range value for column 'TaskId' at row 1 ⚠️ 同步表 AppOperationLogs 失败 [TRUNCATE] 表 AI_AppReportRecords 删除了 0 条 creationtime >= '2025-09-18 06:36:35' 的记录,最小ID=None ✅ 成功清理表 AI_AppReportRecords 最近3小时数据 📥 从 AppReportRecords 读取到 309 条数据 [ERROR] 同步表 AppReportRecords 时发生异常: 1264 (22003): Out of range value for column 'ObjId' at row 1 ⚠️ 同步表 AppReportRecords 失败 [TRUNCATE] 表 AI_AppSortingTaskBoxes 删除了 0 条 creationtime >= '2025-09-18 06:36:36' 的记录,最小ID=None ✅ 成功清理表 AI_AppSortingTaskBoxes 最近3小时数据 📥 从 AppSortingTaskBoxes 读取到 54232 条数据 [ERROR] 同步表 AppSortingTaskBoxes 时发生异常: 1264 (22003): Out of range value for column 'TaskId' at row 1 ⚠️ 同步表 AppSortingTaskBoxes 失败 [TRUNCATE] 表 AI_AppSortingTaskImages 删除了 0 条 creationtime >= '2025-09-18 06:36:45' 的记录,最小ID=None ✅ 成功清理表 AI_AppSortingTaskImages 最近3小时数据 📥 从 AppSortingTaskImages 读取到 157921 条数据 [ERROR] 同步表 AppSortingTaskImages 时发生异常: 1264 (22003): Out of range value for column 'TaskId' at row 1 ⚠️ 同步表 AppSortingTaskImages 失败 [TRUNCATE] 表 AI_AppSortingTaskItems 删除了 0 条 creationtime >= '2025-09-18 06:37:13' 的记录,最小ID=None ✅ 成功清理表 AI_AppSortingTaskItems 最近3小时数据 📥 从 AppSortingTaskItems 读取到 2815 条数据 [ERROR] 同步表 AppSortingTaskItems 时发生异常: 1264 (22003): Out of range value for column 'OutStockOrderId' at row 1 ⚠️ 同步表 AppSortingTaskItems 失败 [TRUNCATE] 表 AI_AppSortingTasks 删除了 0 条 creationtime >= '2025-09-18 06:37:14' 的记录,最小ID=None ✅ 成功清理表 AI_AppSortingTasks 最近3小时数据 📥 从 AppSortingTasks 读取到 312 条数据 [ERROR] 同步表 AppSortingTasks 时发生异常: 1264 (22003): Out of range value for column 'EquipmentId' at row 1 ⚠️ 同步表 AppSortingTasks 失败 [TRUNCATE] 表 AI_AppSortingTaskSkus 删除了 0 条 creationtime >= '2025-09-18 06:37:15' 的记录,最小ID=None ✅ 成功清理表 AI_AppSortingTaskSkus 最近3小时数据 📥 从 AppSortingTaskSkus 读取到 65618 条数据 [ERROR] 同步表 AppSortingTaskSkus 时发生异常: 1264 (22003): Out of range value for column 'BatchNo' at row 1 ⚠️ 同步表 AppSortingTaskSkus 失败 🔴 分播机 Line1 同步失败 🔍 开始检查分播机 Line9 (192.168.110.60)... ✅ 分播机 Line9 (192.168.110.60) 网络通畅 ✅ 分播机 Line9 的数据库文件正常: Z:\sorting.db [TRUNCATE] 表 AI_AppOperationLogs 删除了 0 条 creationtime >= '2025-09-18 06:37:29' 的记录,最小ID=None ✅ 成功清理表 AI_AppOperationLogs 最近3小时数据 📥 从 AppOperationLogs 读取到 3886 条数据 [ERROR] 同步表 AppOperationLogs 时发生异常: 1264 (22003): Out of range value for column 'TaskId' at row 1 ⚠️ 同步表 AppOperationLogs 失败 [TRUNCATE] 表 AI_AppReportRecords 删除了 0 条 creationtime >= '2025-09-18 06:37:31' 的记录,最小ID=None ✅ 成功清理表 AI_AppReportRecords 最近3小时数据 📥 从 AppReportRecords 读取到 258 条数据 [ERROR] 同步表 AppReportRecords 时发生异常: 1264 (22003): Out of range value for column 'ObjId' at row 1 ⚠️ 同步表 AppReportRecords 失败 [TRUNCATE] 表 AI_AppSortingTaskBoxes 删除了 0 条 creationtime >= '2025-09-18 06:37:32' 的记录,最小ID=None ✅ 成功清理表 AI_AppSortingTaskBoxes 最近3小时数据 📥 从 AppSortingTaskBoxes 读取到 48928 条数据 [ERROR] 同步表 AppSortingTaskBoxes 时发生异常: 1264 (22003): Out of range value for column 'TaskId' at row 1 ⚠️ 同步表 AppSortingTaskBoxes 失败 [TRUNCATE] 表 AI_AppSortingTaskImages 删除了 0 条 creationtime >= '2025-09-18 06:37:39' 的记录,最小ID=None ✅ 成功清理表 AI_AppSortingTaskImages 最近3小时数据 📥 从 AppSortingTaskImages 读取到 134633 条数据 [ERROR] 同步表 AppSortingTaskImages 时发生异常: 1264 (22003): Out of range value for column 'TaskId' at row 1 ⚠️ 同步表 AppSortingTaskImages 失败 [TRUNCATE] 表 AI_AppSortingTaskItems 删除了 0 条 creationtime >= '2025-09-18 06:38:04' 的记录,最小ID=None ✅ 成功清理表 AI_AppSortingTaskItems 最近3小时数据 📥 从 AppSortingTaskItems 读取到 2406 条数据 [ERROR] 同步表 AppSortingTaskItems 时发生异常: 1264 (22003): Out of range value for column 'OutStockOrderId' at row 1 ⚠️ 同步表 AppSortingTaskItems 失败 [TRUNCATE] 表 AI_AppSortingTasks 删除了 0 条 creationtime >= '2025-09-18 06:38:05' 的记录,最小ID=None ✅ 成功清理表 AI_AppSortingTasks 最近3小时数据 📥 从 AppSortingTasks 读取到 263 条数据 [ERROR] 同步表 AppSortingTasks 时发生异常: 1264 (22003): Out of range value for column 'EquipmentId' at row 1 ⚠️ 同步表 AppSortingTasks 失败 [TRUNCATE] 表 AI_AppSortingTaskSkus 删除了 0 条 creationtime >= '2025-09-18 06:38:06' 的记录,最小ID=None ✅ 成功清理表 AI_AppSortingTaskSkus 最近3小时数据 📥 从 AppSortingTaskSkus 读取到 57534 条数据 [ERROR] 同步表 AppSortingTaskSkus 时发生异常: 1264 (22003): Out of range value for column 'BatchNo' at row 1 ⚠️ 同步表 AppSortingTaskSkus 失败 🔴 分播机 Line9 同步失败 🔚 本轮同步完成,部分成功。10秒后进入下一轮...
最新发布
09-19
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

playboy-jordan

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值