oracle 函數(shù)

          1字符函數(shù)
          ?1 ascII(char) 返回字符串首字符的ascII 碼
          ?2 chr(n) 將asccII 轉(zhuǎn)化成字符
          ?3 v_chr varchar2(10)
          ?begin
          ? v_char:=chr(56);
          ? dbms_output.put_line('ascII 碼 為'||v_chr);
          ?end;
          ?4 concat 該函數(shù)用于連接字符串,其作用余連接操作符|| 完全相同
          ?5 initcap(char) 用于將字符串中的每個(gè)字符大寫(xiě)
          ?6instr(char1,char2) 該函數(shù)用于取得子串在字符串中的位置 select instr('morning','n') from ,,,
          ?7 length(char)
          ?8 lower(char)
          ?9 lpda(char1,n,char2) 該函數(shù)用于在字符串char1的左端填充字符串char2 ,直至字符串總長(zhǎng)的為n,
          ?? v_lpas:=lpad('aaa',10,'*');---*******aaa
          ?10 ltrim 去掉字符串char1 左端所包含的熱乎字符
          ? select ltirm('morning','m') from dual
          ?11 replace('缺省值為10','缺省','默認(rèn)')--默認(rèn)值為10
          ?12 rpad rpad('aaa',10,'*')--aaa*******
          ?13 rtirm
          ?14 substr v_sub:=substr('morning',1,3)
          ?15 upper
          2 數(shù)值處理函數(shù)
          ?1 abs(),floor(),round(),power(),sort(),....
          3 日期時(shí)間函數(shù)
          ?1 add_months(d,n) 返回特定日期時(shí)間d 之后,的n個(gè)月所對(duì)應(yīng)的日期
          ? v_date:=add_months(sysdate,-14)
          ?2 current_date select current_date from dual
          ?3 current_timestamp
          ?4 dbtimesone
          ?5 extract 從日期時(shí)間中取得所需要的特定數(shù)據(jù)
          ?select extract(year from sysdate) year from dual
          ?6 months_between(d1,d2) 返回日期d1 和d2 之間相差的月數(shù)
          ?7? next_day(d,char)
          4 轉(zhuǎn)換函數(shù)
          ?1 to_char()
          ?2 to_date()
          5 集合函數(shù)
          6 其它單行函數(shù)
          7 分組函數(shù)

          posted on 2006-08-09 10:51 康文 閱讀(280) 評(píng)論(0)  編輯  收藏 所屬分類: 數(shù)據(jù)庫(kù)

          <2006年8月>
          303112345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          導(dǎo)航

          統(tǒng)計(jì)

          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 温州市| 浠水县| 潞城市| 莱芜市| 泊头市| 南川市| 翼城县| 荥经县| 普格县| 工布江达县| 东丰县| 丰城市| 龙门县| 宜宾市| 大新县| 于都县| 潢川县| 库伦旗| 新竹县| 武鸣县| 弋阳县| 育儿| 万宁市| 敦化市| 军事| 兰考县| 琼结县| 华安县| 布拖县| 塘沽区| 龙海市| 镇康县| 焉耆| 阳春市| 台南市| 藁城市| 吉安县| 郑州市| 日喀则市| 尼木县| 吉木乃县|