oracle中函数的使用
摘要:
函数: 作为表达式的一部分调用; 必须在规范中包含 RETURN 子句; 必须返回单个值; 必须包含至少一条 RETURN 语句。有这样的需求,根据身份证号,获得年龄create or replace function getAge(p_IDcard varchar2) return integer isIDcardlen integer;IDcardyear integer;begin IDcardlen :=Length(p_IDcard); if IDcardlen = 18 then IDcardyear := to_number(substr(p_IDcard... 阅读全文
posted @ 2014-03-20 17:05 谭一丹 阅读(262) 评论(0) 推荐(0) 编辑