您的位置:首页 > 产品设计 > UI/UE

Mysql Query error: BIGINT UNSIGNED value is out of range in..解决方法

2017-07-26 11:25 761 查看
当字段类型为 unsigned 时,使用相关结果为负值时就会报错,报错如下:

BIGINT UNSIGNED value is out of range in ..


解决方法

使用 cast() 修改字段类型为 signed
select cast(quantity as signed) - cast(frozen_quantity as signed) from ...
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql range
相关文章推荐