Oracle to_char 转换数值

SQL> Select CONCAT(TO_CHAR('0.001'*100,'990.99'),'%') FROM DUAL;

CONCAT(TO_CHAR('
----------------
0.10%

SQL> select to_char(1234567.89,'9,999,999.99') id from dual;

ID
--------------------------
1,234,567.89

SQL> select to_char(1234567.89,'999,999,999.99') id from dual;

ID
------------------------------
1,234,567.89

SQL> select to_char(1234567.89,'009,999,999.9900') id from dual;

ID
----------------------------------
001,234,567.8900

SQL> select to_char(1234567.89,'9.99EEEE') id from dual;

ID
--------------------
1.23E+06

SQL> select to_char(1234567.89,'999999.99EEEE') id from dual;

ID
--------------------
1.23E+06



SQL> select to_char(-1234567.89,'999,999,999.99PR') id from dual;

ID
--------------------------------
<1,234,567.89>

 

posted @ 2015-03-09 20:59  princessd8251  阅读(1243)  评论(0编辑  收藏  举报