原文:https://blog.51cto.com/bstdn/1951064
1、问题
- 当字段类型为 unsigned 时,使用相关结果为负值时就会报错,报错如下:
BIGINT UNSIGNED value is out of range in ..1.
2、解决
- 使用 cast() 修改字段类型为 signed
select cast(quantity as signed) - cast(quantity2 as signed) from order_details
标签:..,UNSIGNED,signed,BIGINT,value,Mysql,out
From: https://www.cnblogs.com/pine007/p/17381592.html