精品丰满熟女一区二区三区_五月天亚洲欧美综合网_亚洲青青青在线观看_国产一区二区精选

  • <menu id="29e66"></menu>

    <bdo id="29e66"><mark id="29e66"><legend id="29e66"></legend></mark></bdo>

  • <pre id="29e66"><tt id="29e66"><rt id="29e66"></rt></tt></pre>

      <label id="29e66"></label><address id="29e66"><mark id="29e66"><strike id="29e66"></strike></mark></address>
      學(xué)習(xí)啦>學(xué)習(xí)英語>專業(yè)英語>計算機(jī)英語>

      數(shù)據(jù)庫中round的用法

      時間: 長思709 分享

        數(shù)據(jù)庫中round的用法的用法你知道嗎?下面小編就跟你們詳細(xì)介紹下數(shù)據(jù)庫中round的用法的用法,希望對你們有用。

        數(shù)據(jù)庫中round的用法的用法如下:

        Access數(shù)據(jù)庫中Round用法

        四舍五入的問題

        select round(83.124,2) as t from jqdltb

        顯示為:83.12

        select round(83.125,2) as t from jqdltb

        顯示為:83.12

        select round(83.126,2) as t from jqdltb

        顯示為:83.13

        問題來了,就是四舍五入怎么變成五舍六入了呢?

        下面是用這個方法來調(diào)整達(dá)到四舍五入的方法:

        使用int函數(shù)和加0.005,然后*100,再然后/100

        如下所示:

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

        顯示為:83.12

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

        顯示為:83.12

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

        顯示為:83.13

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

        顯示為:83.13

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

        顯示為:83.13

      543201