oracle 3大范式 理解
1 CREATE OR REPLACE PACKAGE pack3 AS 2 FUNCTION fun_calc (num1 NUMBER ,num2 NUMBER ) RETURN number ; 3 function fun_null return varchar2 ; 4 procedure p_add (num1 number ,num2 number ) ; 5 6 END ; 7 / 8 CREATE OR REPLACE PACKAGE BODY pack3 AS 9 FUNCTION fun_calc (num1 NUMBER ,num2 NUMBER ) RETURN NUMBER AS 10 num3 NUMBER:=0 ; 11 BEGIN 12 num3 := num1+num2; 13 RETURN num3 ; 14 END fun_calc; 15 function fun_null return varchar2 as 16 strmsg varchar2(100) := '我是无参的 function !' 17 begin 18 return strmsg ; 19 end fun_null; 20 procedure p_add (num1 number ,num2 number ) as 21 num3 number := 0 ; 22 begin 23 num3 := num1+num2 ; 24 return num1||'+'||num2||'='||num3 ; 25 end p_add ; 26 27 END pack3 ;