在Oracle PL/SQL中,有什么方法可以导入软件包及其成员吗? [英] In Oracle PL/SQL is there any way to import packages and their members?
本文介绍了在Oracle PL/SQL中,有什么方法可以导入软件包及其成员吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
给出一个包:
create or replace package foo as
f1 number := 1;
end;
/
代替:
declare
begin
dbms_output.put_line('f1 = ' || foo.f1);
end;
/
我想写:
declare
begin
-- pseudocode not a valid PL/SQL
import dbms_output.*;
import foo.*;
put_line('f1 = ' || f1);
end;
/
但是该怎么做?
Jeff的(试图保持在PL/SQL中完成事情的精神)
EDIT by Jeff: (trying to stay in the spirit of how things are done in PL/SQL)
DECLARE
PRAGMA IMPORT dbms_output AS d;
PRAGMA IMPORT foo AS f;
BEGIN
d.put_line('f1 = ' || f.f1);
END;
/
推荐答案
很简单,您不能.抱歉,没有其他答案了!
Quite simply, you can't. Sorry, but there is no other answer!
这篇关于在Oracle PL/SQL中,有什么方法可以导入软件包及其成员吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文