oracle单行函数--数学函数
时间:2022-03-15 10:48
数字函数
trunc | 按照指定精度截取一个数 |
*round:四舍五入
例:round(25.328) 结果:25
round(25.328,2) 结果:25.33
round(25.328,-1) 结果:30
*trunc:精确截取
例:trunc(25.328) 结果:25
trunc(25.328,2) 结果:25.32
trunc(25.328,-1) 结果:20
*mod:求余数
例:mod(25,6) 结果:1
mod(25,0) 结果:25