时间:2021-07-01 10:21:17 帮助过:32人阅读
废话太多了,直接上例子:
参考实例:
select to_char(a, ‘99D90‘),
to_char(a, ‘90D90‘),
to_char(a, ‘FM90D99‘),
rtrim(to_char(a, ‘FM90D99‘), to_char(0, ‘D‘))
from (
select 50 a from dual
union all select 50.57 from dual
union all select 5.57 from dual
union all select 0.35 from dual
union all select 0.4 from dual
)
order by a;
TO_CHA TO_CHA TO_CHA RTRIM(
------ ------ ------ ------
.35 0.35 0.35 0.35
.40 0.40 0.4 0.4
5.57 5.57 5.57 5.57
50.00 50.00 50. 50
50.57 50.57 50.57 50.57
参考文档:
详细参考:click here
官方文档: oracle format doc
例子参考: example
oracle转换数字到格式化字符串
标签:数据库 格式化 存储