DROP SYNONYM v11

Name

DROP SYNONYM -- remove a synonym.

Synopsis

DROP [PUBLIC] SYNONYM [<schema>.]<syn_name>

Description

DROP SYNONYM deletes existing synonyms. To execute this command you must be a superuser or the owner of the synonym, and have USAGE privileges on the schema in which the synonym resides.

Parameters

syn_name

syn_name is the name of the synonym. A synonym name must be unique within a schema.

schema

schema specifies the name of the schema that the synonym resides in.

Like any other object that can be schema-qualified, you may have two synonyms with the same name in your search path. To disambiguate the name of the synonym that you are dropping, include a schema name. Unless a synonym is schema qualified in the DROP SYNONYM command, Advanced Server deletes the first instance of the synonym it finds in your search path.

You can optionally include the PUBLIC clause to drop a synonym that resides in the public schema. The DROP PUBLIC SYNONYM command, compatible with Oracle databases, drops a synonym that resides in the public schema:

DROP PUBLIC SYNONYM syn_name;

The following example drops the synonym, personnel:

DROP SYNONYM personnel;

See Also

CREATE SYNONYM