Create/drop synonyms - Oracle Database Script. -- Create public synonym CREATE PUBLIC SYNONYM emp_view FOR scott.emp; -- Create private synonym CREATE SYNONYM priv_view FOR scott.emp; -- Drop synonym DROP PUBLIC SYNONYM emp_view; DROP SYNONYM priv_view; -- View synonym related info SELECT * FROM DBA_SYNONYMS;
-- Create public synonym CREATE PUBLIC SYNONYM emp_view FOR scott.emp; -- Create private synonym CREATE SYNONYM priv_view FOR scott.emp; -- Drop synonym DROP PUBLIC SYNONYM emp_view; DROP SYNONYM priv_view; -- View synonym related info SELECT * FROM DBA_SYNONYMS;