SQL>
SQL>
SQL> create or replace package pkg_a is
2 v_a number:=0;
3 function a1 return NUMBER;
4 end;
5 /
Package created.
SQL> create or replace package body pkg_a is
2 function a1 return NUMBER is
3 begin
4 return 0;
5 end;
6 end;
7 /
Package body created.
SQL> create or replace package pkg_b is
2 function b1 return NUMBER;
3 end;
4 /
Package created.
SQL> create or replace package body pkg_b is
2 function b1 return NUMBER is
3 begin
4 return pkg_a.a1+1;
5 end;
6 end;
7 /
Package body created.
SQL>
SQL>
SQL> select pkg_a.a1, pkg_b.b1 from dual;
A1 B1
---------- ----------
0 1
SQL>
|