oracle 函數

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

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

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

          導航

          統計

          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 祁东县| 全椒县| 江孜县| 昌吉市| 新干县| 辛集市| 尉犁县| 利津县| 宁南县| 新乐市| 顺平县| 松溪县| 莒南县| 镇坪县| 寿阳县| 元氏县| 手游| 分宜县| 巩义市| 肇源县| 遵化市| 沐川县| 永安市| 大石桥市| 宁河县| 西平县| 定兴县| 定安县| 祁连县| 乾安县| 江陵县| 绥阳县| 繁峙县| 阜南县| 韶山市| 长寿区| 奎屯市| 涞源县| 绍兴市| 辽阳县| 龙江县|