DROP SYNONYM

Delete a synonym.

Syntax:

   DROP [PUBLIC] SYNONYM [schema.]synonym [FORCE]


FORCE will drop the synonym even there are dependent tables or user-defined types.

Script to drop and re-create all Synonyms in the schema SS64SCHEMA:

select 'DROP PUBLIC SYNONYM '||object_name||' ;'||chr(13)||chr(10)||'create
 public synonym '||object_name||' for SS64SCHEMA.'||object_name||' ;'
 from user_objects where object_type in (
 'TABLE', 'VIEW', 'SEQUENCE', 'PROCEDURE', 'PACKAGE', 'FUNCTION' )

"A synonym is a word you use when you can't spell the word you first thought of" - Burt Bacharach

Related Oracle Commands:

CREATE SYNONYM
DROP VIEW

Related Views:

 DBA_SYNONYMS         ALL_SYNONYMS         USER_SYNONYMS       PUBLICSYN

 
Copyright © 1999-2024 SS64.com
Some rights reserved