If you are using Trusted Oracle7 in DBMS MAC mode, your DBMS label must match the function's creation label or you must satisfy one of these criteria:
schema
is the schema containing the function. If you omit schema, Oracle7 assumes the function is in your own schema.
function
is the name of the function to be recompiled.
COMPILE
causes Oracle7 to recompile the function. The COMPILE keyword is required.
The ALTER FUNCTION command is similar to the ALTER PROCEDURE command . For information on how Oracle7 recompiles functions and procedures, see the "Dependencies Among Schema Objects" chapter of Oracle7 Server Concepts.
Note: This command does not change the declaration or definition of an existing function. To re-declare or redefine a function, you must use the CREATE FUNCTION command () with the OR REPLACE option.
Example
ALTER FUNCTION merriweather.get_bal
COMPILE
If Oracle7 encounters no compilation errors while recompiling GET_BAL, GET_BAL becomes valid. Oracle7 can subsequently execute it without recompiling it at runtime. If recompiling GET_BAL results in compilation errors, Oracle7 returns an error message and GET_BAL remains invalid.
Oracle7 also invalidates all objects that depend upon GET_BAL. If you subsequently reference one of these objects without explicitly recompiling it first, Oracle7 recompiles it implicitly at runtime.