Given a package:
create or replace package foo as
  f1 number := 1;
end;
/
Instead of:
declare
begin
  dbms_output.put_line('f1 = ' || foo.f1);
end;
/
I'd like to write:
declare
begin
  -- pseudocode not a valid PL/SQL
  import dbms_output.*;
  import foo.*;
  put_line('f1 = ' || f1);
end;
/
But how to do that ?
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With