Oracle7 Server SQL Reference

Contents Index Home Previous Next

DROP FUNCTION

Purpose

To remove a stand-alone stored function from the database.

Prerequisites

The function must be in your own schema or you must have DROP ANY PROCEDURE system privilege.

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 the following criteria:

Syntax

Keywords and Parameters

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 dropped.

Usage Notes

When you drop a function, Oracle7 invalidates any local objects that depend on, or call, the dropped function. If you subsequently reference one of these objects, Oracle7 tries to recompile the object and returns an error message if you have not recreated the dropped function. For more information on how Oracle7 maintains dependencies among schema objects, including remote objects, see the "Dependencies Among Schema Objects" chapter of Oracle7 Server Concepts.

You can only use this command to drop a stand-alone function. To remove a function that is part of a package, use one of the following methods:

Example

The following statement drops the function NEW_ACCT in the schema RIDDLEY:

DROP FUNCTION riddley.new_acct 

When you drop the NEW_ACCT function, Oracle7 invalidates all objects that depend upon NEW_ACCT.

Related Topics

CREATE FUNCTION command [*]


Contents Index Home Previous Next