Creates an alternative name for a table, view or another synonym.
A synonym is created for the table, view or synonym specified in object-name.
If synonym-name is specified in its unqualified form, the synonym will be created in the schema which has the same name as the current ident.
If synonym-name is specified in its fully qualified form (i.e. schema-name.synonym-name) the synonym will be created in the named schema (in this case, the current ident must be the creator of the specified schema).
A synonym may only be created if the creator has some access privilege on the object specified in object-name.
A synonym can only be created for an existing table, view or synonym.
The synonym name may not be the same as the name of any other table, view or synonym already belonging to the schema in which the synonym is created.
The synonym is stored in the data dictionary and it may be used to refer to the associated table or view wherever object-name would normally be used in the syntax specifications for SQL.
Synonyms are not the same as correlation names. The latter are defined in the FROM clause of select-specifications, see The SELECT Specification, and apply only within the context of the statement where they are defined.
ExampleCREATE SYNONYM artists FOR mimer_store_music.artists;
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40