oracle9i----單行函數,復習篇

發表于:2008-10-09來源:作者:點擊數: 標簽:單行復習函數
關鍵字: oracle 9i 單行函數 1.兩種類型的函數 1.單行函數 2.多行函數 select suM(qty) from sales group by stor_id; select substr(au_lname,1,5) from authors;單行函數 單行函數 包括了, 字符函數 大小寫,字符處理(lower,upper initcap) concat,subst
關鍵字:oracle9i 單行函數

  1.兩種類型的函數

  1.單行函數

  2.多行函數

  select suM(qty) from sales group by stor_id;

  select substr(au_lname,1,5) from authors;單行函數

  單行函數 包括了,

  字符函數 大小寫,字符處理(lower,upper initcap) concat,substr,length instr lpad|rpad trim replace

  select lower(au_lname),upper(sdff).initcap

  c /address/au_lame

  run

  **oracl字符比較是區分大小寫。

  select au_lan ||''||jkfdlf from table

  select concat(au_lnme,sdfsf) from talbe

  如果是-1是從右邊取起

  instr(alu_id,'t')是否包括t

  lpad左邊填充什么東西達到一個字符長度lpan(salery,10,'*'))左邊填充,

  trim ('h' from 'al_id')

  結果 elloworld

  select employ_id, concat (firest_name, last_name) name, job_id,length(last_name),

  instr(last_name,'a') "Contains 'a' "?

  from employees

  where substr(job_id,4) = 'rep';

  rpad

  數字函數()

  round四舍五入 trunc省略 mod

  求余

  同上。小樹點左右有關round(d1212,-1)

原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97