SQL>
SQL> COLUMN object_name FORMAT a20
SQL>
SQL> CREATE TABLE simple_table (f1 NUMBER);
Table created.
SQL>
SQL> CREATE OR REPLACE PACKAGE Dependee AS
2 PROCEDURE Example(p_Val IN NUMBER);
3 END Dependee;
4 /
Package created.
SQL>
SQL> CREATE OR REPLACE PACKAGE BODY Dependee AS
2 PROCEDURE Example(p_Val IN NUMBER) IS
3 BEGIN
4 INSERT INTO simple_table VALUES (p_Val);
5 END Example;
6 END Dependee;
7 /
Package body created.
SQL>
SQL> CREATE OR REPLACE PROCEDURE Depender(p_Val IN NUMBER) AS
2 BEGIN
3 Dependee.Example(p_Val + 1);
4 END Depender;
5 /
Procedure created.
SQL>
SQL> SELECT object_name, object_type, status FROM user_objects WHERE object_name IN ('DEPENDER', 'DEPENDEE','SIMPLE_TABLE');
OBJECT_NAME OBJECT_TYPE STATUS
-------------------- ------------------- ----------
DEPENDEE PACKAGE VALID
DEPENDEE PACKAGE BODY VALID
DEPENDER PROCEDURE VALID
SIMPLE_TABLE TABLE VALID
4 rows selected.
SQL>
SQL> CREATE OR REPLACE PACKAGE BODY Dependee AS
2 PROCEDURE Example(p_Val IN NUMBER) IS
3 BEGIN
4 INSERT INTO simple_table VALUES (p_Val - 1);
5 END Example;
6 END Dependee;
7 /
Package body created.
SQL>
SQL> SELECT object_name, object_type, status FROM user_objects WHERE object_name IN ('DEPENDER', 'DEPENDEE','SIMPLE_TABLE');
OBJECT_NAME OBJECT_TYPE STATUS
-------------------- ------------------- ----------
DEPENDEE PACKAGE VALID
DEPENDEE PACKAGE BODY VALID
DEPENDER PROCEDURE VALID
SIMPLE_TABLE TABLE VALID
4 rows selected.
SQL>
SQL> DROP TABLE simple_table;
Table dropped.
SQL>
SQL> SELECT object_name, object_type, status FROM user_objects WHERE object_name IN ('DEPENDER', 'DEPENDEE','SIMPLE_TABLE');
OBJECT_NAME OBJECT_TYPE STATUS
-------------------- ------------------- ----------
DEPENDEE PACKAGE VALID
DEPENDEE PACKAGE BODY INVALID
DEPENDER PROCEDURE VALID
3 rows selected.
SQL>