What is a synonym?

A synonym is also known as alias for a table, view, sequence or program unit.

In the context of Oracle databases, a synonym is an alias or alternate name for a table, view, sequence, procedure, or other database object. Synonyms provide a way to simplify the way users and applications access database objects by providing a different name that can be used instead of the actual object name. This can be useful for security, abstraction, or simplifying complex naming conventions.

For example, if you have a table named “employees” in a schema, you can create a synonym called “emp” that refers to the “employees” table. Users can then query or manipulate the data in the “employees” table using the “emp” synonym.

In summary, a synonym in Oracle is a database object that serves as an alias for another object, making it easier to reference and use in queries or applications.