在數(shù)據(jù)庫(kù)中有時(shí)我們可能需要對(duì)一些數(shù)據(jù)進(jìn)行處理,例如四舍五入、直接舍去后面的幾位等,其實(shí)很簡(jiǎn)單,都是有現(xiàn)成的函數(shù),我們只需要套用就行了:
select round(10.98*10)/10 from dual;--四舍五入
select ceil(10.63*10)/10 from dual;--取上限值
select floor(10.68*10)/10 from dual;--取下限值
新聞熱點(diǎn)
疑難解答
圖片精選