Oracle Function 自定义函数建立实例
2011-01-12 16:14
537 查看
create or replace function getArea(speed IN Number) return varchar2 as v_speed varchar2(100); begin select case when (speed >0 and speed<1) or speed=1 then '0~1' when speed >1 and speed <=2 then '1~2' when speed >2 and speed <=3 then '2~3' when speed >3 and speed <=4 then '3~4' when speed >4 and speed <=5 then '4~5' when speed >5 and speed <=6 then '5~6' when speed >6 and speed <=7 then '6~7' when speed >7 and speed <=8 then '7~8' when speed >8 and speed <=9 then '8~9' when speed >9 and speed <=10 then '9~10' when speed >10 and speed <=11 then '10~11' when speed >11 and speed <=12 then '11~12' when speed >12 and speed <=13 then '12~13' when speed >13 and speed <=14 then '13~14' when speed >14 and speed <=15 then '14~15' when speed >15 and speed <=16 then '15~16' when speed >16 and speed <=17 then '16~17' when speed >17 and speed <=18 then '17~18' when speed >18 and speed <=19 then '18~19' when speed >19 and speed <=20 then '19~20' when speed >20 and speed <=21 then '20~21' when speed >21 and speed <=22 then '21~22' when speed >22 and speed <=23 then '22~23' when speed >23 and speed <=24 then '23~24' when speed >24 and speed <=25 then '24~25' when speed >25 and speed <=26 then '25~26' when speed >26 and speed <=27 then '26~27' when speed >27 and speed <=28 then '27~28' when speed >28 and speed <=29 then '28~29' when speed >29 then '29~30' else '0' end into v_speed from dual; return v_speed; end;
相关文章推荐
- Oracle Pipelined Function 管道函数实例
- oracle 自定义函数实例
- 对自定义函数建立索引时抛异常--ORA-30553: 函数不能确定(ORA-30553: The function is not deterministic)解决方法
- Oracle 自定义函数语法与实例
- Sql建立自定义函数(函数和调用实例)(转载)
- Oracle 自定义函数Function
- ORACLE 自定义函数实例,已知2点坐标求直线距离
- Oracle 自定义split 函数实例详解
- MySQL 自定义函数CREATE FUNCTION实例
- Sql建立自定义函数(函数和调用实例)
- Oracle包体,包含存储过程,自定义函数(function),自定义类型(table),用函数返回自定义类型(相当于返回一张表)
- Oracle 自定义函数Function
- Oracle技术之基于自定义函数的Function-Based索引创建
- Oracle自定义函数实例
- oracle自定义函数function
- [轉]经验分享 Excel中自定义函数实例剖析
- 如何通过Hibernate调用oracle自定义函数
- Oracle创建一个type、package、body、function、procedure及常用系统函数。
- ORACLE常用函数实例
- ORACLE分析函数----自定义聚合函数