-- tanslate(str,from_str,to_str) -- 將str中的from_str替換成to_str select translate('hello','e','o') t from dual;-- instr(str,des_str) -- 可以實現like功能 select instr('hello','g'),instr('hello','h'),instr('hello','l') from dual; -- decode(value,s1,r1,s2,r2,default) -- 類似于if else select decode('1','1','一級部門','2','二級部門','其他部門') as dept from dual;-- case表達式 select case 1when 1 then '001'when 2 then '002'else '003'end as le from dual;-- 層次化查詢(樹形結構) select level,id,pid,name from t_test start with pid is null connect by prior id=pid;
?