DROP SYNONYM
The DROP SYNONYM statement removes a synonym from the database.
If the synonym is replicated across an active standby pair and if DDL_REPLICATION_LEVEL is 2 or greater, the DROP SYNONYM statement drops the synonym from the active standby pair for all databases in the replication scheme. See Making DDL Changes in an Active Standby Pair in the Oracle TimesTen In-Memory Database Replication
Guide for more information.
Required Privilege
No privilege is required to drop the private synonym by its owner. The DROP ANY SYNONYM privilege is required to drop another user's private synonym.
The DROP PUBLIC SYNONYM privilege is required to drop a PUBLIC synonym.
Usage with TimesTen Scaleout
This statement is supported with TimesTen Scaleout.
SQL Syntax
To drop a private synonym, use the following syntax:
DROP SYNONYM [Owner.]SynonymName
To drop a public synonym:
DROP PUBLIC SYNONYM SynonymNameParameters
| Parameter | Description |
|---|---|
|
|
Specify |
|
|
Optionally, specify the owner for a private synonym. If you omit the owner, the private synonym must exist in the current user's schema. |
|
|
Specify the name of the synonym to be dropped. |
Examples
Drop the public synonym pubemp:
DROP PUBLIC SYNONYM pubemp; Synonym dropped.
Drop the private synjobs synonym:
DROP SYNONYM synjobs; Synonym dropped.
As user terry with DROP ANY SYNONYM privilege, drop the private syntab synonym owned by ttuser.
DROP SYNONYM ttuser.syntab; Synonym dropped.
See also