NUMBER FORMATS

引自:http://www.ss64.com/orasyntax/numfmt.html

Oracle Number formats

A number format may be used as part a TO_CHAR or TO_DATE function to return a number in the specified format.

FormatDescription
Example
9Number
(suppress leading/trailing zeros)
Includes a leading - for negative no's or one leading space for pos no's

9999=' 123'
0Number
including leading/trailing zeros
09999=0123
9999D00=123.00
FMSupress all leading /trailing blanksFM9999=123
$Include a leading $$999=$123
BOver-ride the '0' format and replace leading 0's with blank spaces ' ' B9999=' 123'
SInclude poth positive+ and negative - signsS999 =+123
999S =123+
PRIndicate SIGN with <brackets>PR999=<123>
PR999=' 123 '
MIIndicate Minus SIGN999MI=123-
RN or rnReturn upper or lower case roman numberalRN99=XI
DPosition of decimal point(.)99D99=12.34
GGroup separator (often a comma) in desired position9G999=1,234
,Return a comma in desired position9,999=1,234
.Return a period in desired position99.99=12.34
CISO currency symbolC99
LLocal currency symbolL99

Some of the format elements above can only be used at the start or end of a format string:
MI, PR, S

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值