Synonyms, or alternative names can be created for tables, views or other synonyms. You can create synonyms to personalize tables or just for your own convenience. Synonym names can be made up of a maximum of 128 characters.
Table names are `qualified' by the name of the schema to which they belong. The qualified form of the table name is the schema name followed by the table name and the two are separated by a period.
Synonyms are particularly useful when several users refer to a common table, such as
MIMER_STORE.CURRENCIES, etc. With synonyms, several users can work in the same apparent environment without needing to refer to the tables by their qualified names.
ITEMSin the schema
MIMER_STOREhas the qualified name:MIMER_STORE.ITEMS
The ident called
MIMER_STOREneed only refer to it as:ITEMS
If other users wish to use this table, they must refer to it by its fully qualified name since they do not have the same name as the schema to which the table belongs.
If a user named
JAMES, who wishes to refer to the
ITEMStable, belonging to the schema
MIMER_STORE, as simply
ITEMS, he can create a synonym.
In the following example, the schema name
JAMESis implied by default (which must also have been created by user
CREATEis to succeed) because the synonym name is specified in its unqualified form (and the default schema name is the name of the current ident):CREATE SYNONYM items FOR mimer_store.items;
Another user can then create his own synonym for the
ITEMSsynonym that now exists in schema '
JAMES', which has the fully qualified name:JAMES.ITEMS
Mimer Information Technology AB
Phone: +46 18 780 92 00