摘要:
用oracle sql对数字进行操作: 取上取整、向下取整、保留N位小数、四舍五入、数字格式化取整(向下取整): select floor(5.534) from dual; select trunc(5.534) from dual; 上面两种用法都可以对数字5.534向下取整,结果为5. 如果要向上取整 ,得到结果为6,则应该用ceil select ceil(5.534) from dual;四舍五入: SELECT round(5.534) FROM dual; SELECT round(5.534,0) FROM dual; SELECT round(5.534,1) FROM .. 阅读全文