如何舍入数字 [英] how to round the Number

查看:61
本文介绍了如何舍入数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在使用小数舍入数字时遇到问题



搜索结果我只得到以下答案。

选择回合(1.12,1)取1.10。

选择回合(1.15,1)取1.20。



但我需要如下结果。



Ex:12.34 = 12.30

Ex:12.35 = 12.35

Ex:12.36 = 12.40

Ex:12.95 = 12.95

Ex:12.96 = 13.00



请帮帮我



Maideen

解决方案

尝试:

 选择 round( 1  .12 * 10, 1 )/ 10 


Hi
I have problem in rounding the number with decimal

search result I only got the following answer.
select round(1.12,1) it takes as 1.10.
select round(1.15,1) it takes as 1.20.

But I need the result like below.

Ex: 12.34 = 12.30
Ex: 12.35 = 12.35
Ex: 12.36 = 12.40
Ex: 12.95 = 12.95
Ex: 12.96 =13.00

Pls help me

Maideen

解决方案

Try :

select round(1.12*10,1)/10


这篇关于如何舍入数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆