SQLMentor // glossary

Synonym

A synonym is an alternate name for a database object — a table, view, or procedure — letting you reference it without knowing (or hardcoding) its real schema or location.

Synonyms are common in Oracle for hiding schema ownership from application code: an app can query employees via a public synonym without needing to know it's actually hr.employees. They're also used to simplify references across database links, or to let a schema migration happen without breaking existing queries, by simply repointing the synonym.

CREATE SYNONYM employees FOR hr.employees;