Oracle 转字符数据类型 的方法 TO_CHAR

TO_CHAR(number,'format_model')

9 -->Represents a number

0 --> Forces a zero to be displayed

.  -->Prints a decimal point

, --> Prints a comma as a thousands indicator

 

select to_char(6000,'99,999.00') from dual;

6,000.00

select to_char(6000,'00,000.00') from dual;

06,000.00

posted @ 2020-06-15 14:23  Journey&Flower  阅读(716)  评论(0编辑  收藏  举报