1 回答

TA貢獻(xiàn)1833條經(jīng)驗(yàn) 獲得超4個(gè)贊
Oracle Round 函數(shù)的意思是四舍五入的方法,即傳回一個(gè)數(shù)值,該數(shù)值是按照指定的小數(shù)位元數(shù)進(jìn)行四舍五入運(yùn)算的結(jié)果。
Oracle Round 函數(shù)使用示例如下:
SELECT ROUND( number, [ decimal_places ] ) FROM DUAL
1、參數(shù) number 是指需要處理的數(shù)值,是必須填寫的值。
2、參數(shù) decimal_places 是指在進(jìn)行四舍五入運(yùn)算時(shí) , 小數(shù)的應(yīng)取的位數(shù),該參數(shù)可以不填,不填的時(shí)候,系統(tǒng)默認(rèn)小數(shù)位數(shù)取0。
3、函數(shù)應(yīng)用舉例:
①“select round(988.211, 0) from dual;”得到結(jié)果為:988
②“select round(988.211, 1) from dual;”得到結(jié)果為:988.2
③“select round(988.211, 2) from dual;” 得到結(jié)果為:988.21
④“select round(988.211, 3) from dual;” 得到結(jié)果為:988.211
⑤“select round(-988.211, 2) from dual;”得到結(jié)果為:-988.21
- 1 回答
- 0 關(guān)注
- 761 瀏覽
添加回答
舉報(bào)