Home >Topics >Access >How to use the Round function in access database

How to use the Round function in access database

王林
王林forward
2020-11-23 17:11:2510251browse

How to use the Round function in access database

How to use the Round function in the access database:

(Related recommendations: access database tutorial)

Rounding The question

select round(83.124,2) as t from jqdltb

is displayed as: 83.12

select round(83.125,2) as t from jqdltb

is displayed as: 83.12

select round(83.126,2) as t from jqdltb

is displayed as: 83.13

The question is, how to round it into five What about rounding up?

The following is how to use this method to adjust to achieve rounding:

Use the int function and add 0.005, then *100, then /100

as shown below:

select int((83.121+0.005)*100)/100 as t from jqdltb

Displayed as: 83.12

select int((83.124+0.005)*100)/100 as t from jqdltb

Displayed as: 83.12

select int((83.125+0.005)*100)/100 as t from jqdltb

Displayed as: 83.13

select int((83.126+0.005)*100)/100 as t from jqdltb

Displayed as: 83.13

select int((83.129+0.005)*100)/100 as t from jqdltb

Displayed as: 83.13

The above is the detailed content of How to use the Round function in access database. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete