ALTER MACRO
Purpose
Use the ALTER MACRO statement to recompile a macro created with CREATE MACRO.
To recompile a function created with the SQL_MACRO clause, see ALTER FUNCTION.
Prerequisites
To recompile a macro in your schema, you must own it. To recompile a macro in another schema, you must have the ALTER ANY PROCEDURE system or schema privilege.
Syntax
alter_macro::=

Description of the illustration alter_macro.gif
Semantics
IF EXISTS
Specify IF EXISTS to suppress the error if the specified macro does not exist.
schema
Specify the schema that contains the macro. If you omit schema, Oracle AI Database looks for the macro in your schema.
macro_name
Specify the name of the macro to recompile.
COMPILE
Specify COMPILE to recompile the macro definition. Recompilation can invalidate SQL cursors that invoke the macro; affected statements are reparsed when next executed. To change the definition, use CREATE OR REPLACE MACRO.
Examples
Recompiling a Macro: Example
The following statement recompiles adjusted_salary in the current schema:
ALTER MACRO adjusted_salary COMPILE;
To suppress the error if the macro does not exist, specify IF EXISTS:
ALTER MACRO IF EXISTS adjusted_salary COMPILE;
See Also: