Home > Database > Mysql Tutorial > 将expression转换为数据类型int时出现算术溢出错误

将expression转换为数据类型int时出现算术溢出错误

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:22:46
Original
3283 people have browsed it

发现一个隐藏在项目里面的bug,项目一直都是正常的,突然某个月的月报出现问题,后来发现时select sum(test)这个函数sum里的数字越界了,利用cast进行类型转换即可解决问题, select sum(cast(test as bigint))......这样就没问题了。

发现一个隐藏在项目里面的bug,项目一直都是正常的,突然某个月的月报出现问题,后来发现时select sum(test)这个函数sum里的数字越界了,利用cast进行类型转换即可解决问题,

select sum(cast(test as bigint))......这样就没问题了。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template