我想执行算术运算,例如:
select 99999999999999999999999999999999999999 * 256但是,这会导致错误。
将表达式转换为数据类型数值的算术溢出错误。
如何执行将返回精度大于38的值的算术操作?
发布于 2018-07-23 11:52:48
您可以使用float --但是首先读一下这个很好的答案:
Difference between numeric, float and decimal in SQL Server
declare @x float = 99999999999999999999999999999999999999;
declare @y float = 256;
select @y*@x否则,小数(38,0)是唯一持有9999.
declare @x decimal(38,0) = 99999999999999999999999999999999999999;https://stackoverflow.com/questions/51478010
复制相似问题