2.2.4 Synonyms

Table of Contents Previous Next



2.2.4 Synonyms
A synonym is an identifier that can be used to reference another database object in a SQL statement. A synonym is useful in cases where a database object would normally require full qualification by schema name to be properly referenced in a SQL statement. A synonym defined for that object simplifies the reference to a single, unqualified name.
To delete a synonym, use the command, DROP SYNONYM. The syntax is:
DROP [PUBLIC] SYNONYM [schema.] syn_name
syn_name is the name of the synonym. A synonym name must be unique within a schema.
schema specifies the name of the schema in which the synonym resides.
You can optionally include the PUBLIC clause to drop a synonym that resides in the public schema. Compatible with Oracle databases, the DROP PUBLIC SYNONYM command drops a synonym that resides in the public schema:


Table of Contents Previous Next