巷尾的酒吧

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            64 Posts :: 0 Stories :: 5 Comments :: 0 Trackbacks
          select concat('1','2') zhao from dual;
          select initcap('abin') from dual;
          select lower('ABIN') from dual;
          select upper('abin') from dual;
          select lpad('abin',10,'*') from dual;
          select rpad('abin',7,'*') from dual;
          select ltrim('aaaabain','a') from dual;
          select rtrim('abinaa','a') from dual;
          select trim('a' from 'ababina') from dual;
          select ceil(3.1415926) from dual;
          select floor(3.1415926) from dual;
          select sign(-123) zheng,sign(123) fu ,sign(0) ling from dual;
          select last_day(sysdate-1) from dual;
          select nvl('','0') from dual;
          select nullif('abin','abina') from dual;
          select nvl2('aa','abin','varyall') from dual;
          select coalesce('','1','2') from dual;

          Coalesce函數

          Coalese函數的作用是的NVL的函數有點相似,其優勢是有更多的選項。

          格式如下:

          Coalesce(expr1, expr2, expr3….. exprn)

          Coalesce是這樣來處理這些參數的。如果第一個參數為空,則看第二個參數是否是空,否則則顯示第一個參數,如果第二個參數是空再看第三個參數是否為空,否則顯示第二個參數,依次類推。

          這個函數實際上是NVL的循環使用,在此就不舉例子了。

          posted on 2012-12-02 22:43 abing 閱讀(263) 評論(0)  編輯  收藏 所屬分類: oracle
          主站蜘蛛池模板: 出国| 大理市| 天峻县| 德州市| 偃师市| 巍山| 阆中市| 灵石县| 黑河市| 台前县| 黑水县| 博乐市| 格尔木市| 嘉义市| 阜新| 崇礼县| 榆树市| 共和县| 曲靖市| 景洪市| 富顺县| 睢宁县| 红桥区| 银川市| 阳东县| 奉新县| 同心县| 鹰潭市| 清水县| 上栗县| 阿坝县| 瑞金市| 安岳县| 龙泉市| 开阳县| 平谷区| 枞阳县| 鄢陵县| 京山县| 来凤县| 开阳县|