8. SQL Statements : CREATE SYNONYM
 
Share this page                  
CREATE SYNONYM
Valid in: SQL, ESQL, DBProc, OpenAPI, ODBC, JDBC, .NET
The CREATE SYNONYM statement defines a synonym for a table, view, or index. A synonym is an alias (alternate name) for an object.
References to synonyms in applications are resolved to their base objects at runtime. References to synonyms in definitions of database procedures, views, and permissions are resolved at the time the procedure, view, or permission is defined. For this reason, the synonym must be valid at definition time and at runtime, but can be dropped and recreated in between.
Use the HELP statement to display existing synonyms.
To display all the synonyms that you own
HELP SYNONYM *.
To display all the synonyms that you own and have access to
HELP SYNONYM *.*