日期:2014-05-17 浏览次数:20783 次
SQL> create or replace package pk1 as 2 procedure p1(pn in number default 100); 3 function f1 return number; 4 end; 5 / Package created SQL> create or replace package body pk1 as 2 procedure p1(pn in number default 100) as 3 v_num number; 4 begin 5 v_num := f1; 6 dbms_output.put_line(v_num); 7 end; --end p1 8 9 function f1 return number as 10 begin 11 return 1; 12 end; --end f1 13 end; 14 / Package body created SQL> select pk1.f1 from dual; F1 ---------- 1 SQL> exec pk1.p1; 1 PL/SQL procedure successfully completed SQL>