$1,890.55格式的顯示

jichengjie發表於2018-03-13
Connected to Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 
Connected as sh

SQL> SELECT TO_CHAR(1890.55,'$99,999.99')
  2  FROM DUAL;


TO_CHAR(1890.55,'$99,999.99')
-----------------------------
  $1,890.55


SQL> 
SQL> SELECT TO_CHAR(1890.55,'$99G999D00')
  2  FROM DUAL;


TO_CHAR(1890.55,'$99G999D00')
-----------------------------
  $1,890.55


SQL> 
SQL> SELECT TO_CHAR(1890.55,'$99G999D99')
  2  FROM DUAL;


TO_CHAR(1890.55,'$99G999D99')
-----------------------------
  $1,890.55


SQL> 
SQL> SELECT TO_CHAR(1890.55,'$0,000.00')
  2  FROM DUAL;


TO_CHAR(1890.55,'$0,000.00')
----------------------------
 $1,890.55


SQL> 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26870952/viewspace-2151822/,如需轉載,請註明出處,否則將追究法律責任。

相關文章