Mysql Query error: BIGINT UNSIGNED value is out of range in..解决方法
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mysql Query error: BIGINT UNSIGNED value is out of range in..解决方法相关的知识,希望对你有一定的参考价值。
当字段类型为 unsigned 时,使用相关结果为负值时就会报错,报错如下:
BIGINT UNSIGNED value is out of range in ..
解决方法
使用 cast() 修改字段类型为 signed
select cast(quantity as signed) - cast(frozen_quantity as signed) from ...
本文出自 “技术蓝” 博客,请务必保留此出处http://bstdn.blog.51cto.com/8667020/1951064
以上是关于Mysql Query error: BIGINT UNSIGNED value is out of range in..解决方法的主要内容,如果未能解决你的问题,请参考以下文章
mysql_query() 为 FALSE 但 mysql_error() 为空
Mac OSX / MySQL 5.6.19 上的“Mysql2::Error: Lost connection to MySQL server during query”
MySQL四种类型日志:Error LogGeneral Query LogBinary LogSlow Query Log
MySQL每隔一小会不操作报错ERROR 2013 (HY000) Lost connection to MySQL server during query问题
Mysql导入Sql文件时报Error Code: 2013 - Lost connection to MySQL server during query