我需要在SQL Server中四舍五入一个数值。
考虑这个例子-我的值是179.8744。
我想把它转换成179.88
我试过ROUND函数,但只有当第三个值大于5时才能转换。还有其他函数吗?
提前谢谢。
发布于 2020-11-05 15:13:33
发布于 2020-11-05 15:07:16
使用十进制或四舍五入,如下所示!Examples decimal
select cast(179.8744 as decimal(10,2))
OR
select round(179.8744,2)https://stackoverflow.com/questions/64692473
复制相似问题