亚洲欧洲国产欧美一区精品,激情五月亚洲色五月,最新精品国偷自产在线婷婷,欧美婷婷丁香五月天社区

      考試首頁 | 考試用書 | 培訓(xùn)課程 | 模擬考場 | 考試論壇  
      全國  |             |          |          |          |          |         
        當(dāng)前位置:計算機等級 > 二級考試 > Java語言程序設(shè)計 > 考試輔導(dǎo) > 文章內(nèi)容
        

      全國計算機等級考試二級Java重點內(nèi)容(9)

      中華IT學(xué)院   【 】  [ 2016年9月18日 ]

      Oracle中的日期處理

      select to_char(sysdate, 'yyyy-mm-dd')from dual;

       

      select ename, hiredate, round(sysdate - hiredate) days from emp_ning;

       

      select sysdate - 10 from dual;

       

      select ename, hiredate,round(months_between(sysdate, hiredate))as monsfrom emp_ning;

       

      --函數(shù)的嵌套

      f4(f3(f1(f2(p1,p2)), p3), p4)

       

      concat(concat(concat(concat('a','b'),'c'),'d'), 'e')

       

      'a' || 'b' || 'c' || 'd' || 'e'

       

      select 'hello' || 'world' from dual;

       

      --計算三個月以后的時間

      select add_months(sysdate, 3)from dual;

       

      select last_day(sysdate) from dual;

       

      --修改tom的入職時間是12年2月1號

      update emp_ningset hiredate = to_date('2012/02/01','yyyy/mm/dd')where ename = 'tom';

       

      --增加一個職員:

      --1012, 'jerry', '2012-01-12' insert into emp_ning(empno, ename, hiredate)values(1012, 'jerry',

      to_date('2012/01/12','yyyy/mm/dd'));

       

      to_date('2012-01-12','yyyy-mm-dd')

      to_char(sysdate, 'yyyy-mm-dd')

       

            to_char       to_number

      日期  -------> 字符 --------> 數(shù)字

            <------       <--------

            to_date        to_char

       

          to_char         to_number

      10000 --> $10,000.00 --> 10000

      數(shù)字      字符           數(shù)字

      2012-02-01

      2012/02/01

       

      04/05/10

      分享到:
      本文糾錯】【告訴好友】【打印此文】【返回頂部
      將考試網(wǎng)添加到收藏夾 | 每次上網(wǎng)自動訪問考試網(wǎng) | 復(fù)制本頁地址,傳給QQ/MSN上的好友 | 申請鏈接 | 意見留言 TOP
      關(guān)于本站  網(wǎng)站聲明  廣告服務(wù)  聯(lián)系方式  站內(nèi)導(dǎo)航  考試論壇
      Copyright © 2007-2013 中華考試網(wǎng)(Examw.com) All Rights Reserved