| Oracle9i SQL Reference Release 2 (9.2) Part Number A96540-02 |
|
|
View PDF |
Use the DROP SYNONYM statement to remove a synonym from the database or to change the definition of a synonym by dropping and re-creating it.
| See Also:
CREATE SYNONYM for more information on synonyms |
To drop a private synonym, either the synonym must be in your own schema or you must have the DROP ANY SYNONYM system privilege.
To drop a PUBLIC synonym, you must have the DROP PUBLIC SYNONYM system privilege.
drop_synonym::=
You must specify PUBLIC to drop a public synonym. You cannot specify schema if you have specified PUBLIC.
Specify the schema containing the synonym. If you omit schema, then Oracle assumes the synonym is in your own schema.
Specify the name of the synonym to be dropped.
If you drop a synonym for a materialized view, or its containing table or materialized view, or any of its dependent tables, then Oracle invalidates the materialized view.
You cannot drop a type synonym that has any dependent tables or user-defined types unless you also specify FORCE.
Specify FORCE to drop the synonym even if it has dependent tables or user-defined types.
|
Caution: Oracle does not recommend that you specify |
To drop the public synonym named customers (created in "Resolution of Synonyms Example"), issue the following statement:
DROP PUBLIC SYNONYM customers;