Managing Synonyms

Previous
Previous
Next
Next

A synonym is an alias for any schema object such as a table or view. Synonyms provide an alternative name for a database object and can be used to simplify SQL statements for database users. For example, you can create a synonym named emps as an alias for the employees table in the HR schema.

If a table in an application has changed, such as the personnel table has replaced the employees table, you can use the employees synonym to refer to the personnel table so that the change is transparent to the application code and the database users.

Because a synonym is simply an alias, it does not require any storage in the database other than its definition.

You can create both public and private synonyms. A public synonym can be accessed by every user in a database. A private synonym is in the schema of a specific user who has control over its availability to others.

This section contains the following topics:

For examples of managing synonyms using SQL statements, see "Creating and Dropping a Synonym With SQL".


See Also:

Oracle Database Express Edition Application Express User's Guide for information about managing synonyms