Manage synonyms
You can create SQL synonyms as another way of referencing tables,
views, or function in databases and schemas. For example, use synonyms
to:
- Create names that are easier to type than the actual names of database objects, which might be very long
- Create a level of abstraction that allows you to swap out underlying database objects without affecting the code that references those objects
Synonyms are subject to the same naming restrictions as tables, views, and functions. They must be unique within a schema and their names cannot be the same as global objects such as those of databases, users, or groups.
You can issue the following synonym commands:
- CREATE SYNONYM
- Create a synonym.
- DROP SYNONYM
- Drop or delete a synonym.
- ALTER SYNONYM
- Rename or change the owner of a synonym.
- GRANT SYNONYM
- Grant permission to create, alter, or drop a synonym to a user or group.
- REVOKE SYNONYM
- Revoke permission to create, alter, or drop a synonym to a user or group.