日期:2014-05-17 浏览次数:20881 次
14:07:49 SYS@orcl> col a format 9999999999999999.99
14:07:56 SYS@orcl> select round(2132142.10,2) a from dual;
A
--------------------
2132142.10
已选择 1 行。
with t1 as
(
select '123.4' c1 from dual union all
select '123.55' c1 from dual union all
select '123.24' c1 from dual union all
select '123.6' c1 from dual
)
select decode(length(c1)-instr(c1,'.'),1,c1
------解决方案--------------------
'0',c1) c1
from t1
c1
--------------------
1 123.40
2 123.55
3 123.24
4 123.60