Home > Topics > Access > body text

How to use the Round function in access database

王林
Release: 2020-11-23 17:11:25
forward
10196 people have browsed it

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
Copy after login

is displayed as: 83.12

select round(83.125,2) as t from jqdltb
Copy after login

is displayed as: 83.12

select round(83.126,2) as t from jqdltb
Copy after login

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
Copy after login

Displayed as: 83.12

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

Displayed as: 83.12

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

Displayed as: 83.13

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

Displayed as: 83.13

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

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!

Related labels:
source:csdn.net
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