--先建包头 create or replace package sp_test as procedure sp_test1(v_str varchar2); procedure sp_test2; procedure sp_test3; end sp_test;--再建包体 create or replace package body sp_test as procedure sp_test1(v_str varchar2) is begin dbms_output.put_lint(v_str); end; procedure sp_test2() is begin null; end; ..... end sp_test; 这样就把包建好了啊 然后编译成功后,调用时把包头加上就可以了,如sp_test.sp_test2
请教下包体里面的存储过程是已经编译成功的存储过程, 还是要把需要用到得存储过程脚本拿出来 放在里面 (例如 放在 sp_test1 的begin 和 end 里面)
还是不清楚具体怎么写...
才请教熟悉的朋友帮个忙
create or replace package sp_test as
procedure sp_test1(v_str varchar2);
procedure sp_test2;
procedure sp_test3;
end sp_test;--再建包体
create or replace package body sp_test as
procedure sp_test1(v_str varchar2) is
begin
dbms_output.put_lint(v_str);
end;
procedure sp_test2() is
begin
null;
end;
.....
end sp_test;
这样就把包建好了啊 然后编译成功后,调用时把包头加上就可以了,如sp_test.sp_test2
还是要把需要用到得存储过程脚本拿出来 放在里面 (例如 放在 sp_test1 的begin 和 end 里面)