Synonyms
Create
CREATE OR REPLACE [PUBLIC] SYNONYM [schema.]<SynonymName> FOR [schema.]<TableOrObjectName>.[@dblink]; ---- GRANT <priv: select, insert, update...> ON <SynonymName> TO <Username|Role|PUBLIC>;
CREATE OR REPLACE PUBLIC SYNONYM department FOR hr.department; GRANT SELECT ON department TO public;
In most cases when creating a synonym you also grant privileges to it.
Display
SELECT synonym_name, table_owner, table_name FROM dba_synonyms WHERE owner='&SCHEMA';
Drop
DROP [PUBLIC] SYNONYM [Username.]<SynonymName>;
DROP PUBLIC SYNONYM department; DROP SYNONYM hr.department;