SQL> select 10/3 from dual;
10/3
----------
3.33333333
SQL> select trunc(123.12312312312232132342342342345234524352435,20) from dual;
TRUNC(123.12312312312232132342342342345234524352435,20)
-------------------------------------------------------
123.123123
SQL> select trunc(123.12312312312232132342342342345234524352435,10) from dual;
TRUNC(123.12312312312232132342342342345234524352435,10)
-------------------------------------------------------
123.123123
从测试中看出,oracle系统自动对数据的小数部分进行了截取,如何能自定义小数部分的长度?
阅读(867) | 评论(0) | 转发(0) |