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 康文 閱讀(278) 評論(0)  編輯  收藏 所屬分類: 數據庫

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

          導航

          統計

          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 西宁市| 永靖县| 顺平县| 洛隆县| 原阳县| 大余县| 常德市| 常州市| 修文县| 南雄市| 大洼县| 区。| 丹寨县| 来凤县| 壶关县| 龙川县| 秦皇岛市| 合山市| 新巴尔虎右旗| 临西县| 双峰县| 巴青县| 沁源县| 朝阳县| 崇阳县| 元阳县| 多伦县| 鄂托克前旗| 康马县| 安塞县| 宽城| 墨竹工卡县| 珲春市| 东乌珠穆沁旗| 太湖县| 四平市| 哈巴河县| 甘德县| 东莞市| 农安县| 南涧|