functions

jichengjie發表於2018-03-06
函式INITCAP()是將每個單詞的第一個字母大寫,其它字母變為小寫返回.


  單詞由空格,控制字元,標點符號等非字母符號限制.


select initcap('hello world') from dual;


  結果


  INITCAP('HELLO WORLD')


  -----------


  Hello World


SELECT TRUNC(15.79,1) "Truncate" FROM DUAL;

  Truncate
----------
      15.7

SELECT TRUNC(15.79,-1) "Truncate" FROM DUAL;

  Truncate
----------
        10


The following example rounds a number to one decimal point:

SELECT ROUND(15.193,1) "Round" FROM DUAL;

     Round
----------
      15.2


SELECT ROUND(15.193,-1) "Round" FROM DUAL;

     Round
----------
        20 

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

相關文章