DROP MACRO

Purpose

Use the DROP MACRO statement to remove a SQL macro created with CREATE MACRO.

To remove a function created with the SQL_MACRO clause, see DROP FUNCTION for more information.

Prerequisites

To drop a macro in your schema, you must own it. To drop a macro in another schema, you must have the DROP ANY PROCEDURE system or schema privilege.

Syntax

drop_macro::=

Description of the illustration drop_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 remove. The statement identifies the macro object by name; it does not select an individual overload. Dropping a macro invalidates SQL cursors that depend on it. Affected statements are reparsed when next executed.

Examples

Dropping a Macro: Example

The following statement removes adjusted_salary from the current schema:

DROP MACRO adjusted_salary;

To suppress the error if the macro does not exist, specify IF EXISTS:

DROP MACRO IF EXISTS adjusted_salary;

See Also: