This package will not compile because the specification and body do not match.
SQL>
SQL> CREATE OR REPLACE PACKAGE PackageA AS
2 FUNCTION FunctionA(p1 IN NUMBER,p2 IN DATE)
3 RETURN VARCHAR2;
4 END PackageA;
5 /
Package created.
SQL>
SQL>
SQL>
SQL> CREATE OR REPLACE PACKAGE BODY PackageA AS
2 FUNCTION FunctionA(p1 IN CHAR)
3 RETURN VARCHAR2;
4 END PackageA;
5 /
Warning: Package Body created with compilation errors.
SQL>
SQL>
SQL>
SQL> show errors
Errors for PACKAGE BODY PACKAGEA:
LINE/COL ERROR
-------- -----------------------------------------------------------------
2/13 PLS-00323: subprogram or cursor 'FUNCTIONA' is declared in a
package specification and must be defined in the package body
2/13 PLS-00328: A subprogram body must be defined for the forward
declaration of FUNCTIONA.
SQL>
SQL>
Related examples in the same category