1.1.1

Table Of Contents
Syntax
CREATE SYNONYM synonym-Name FOR { view-name | table-name }
Description
The synonym-Name in the statement represents the synonym name you are giving the target table or view, while
the view-Name or table-Name represents the original name of the target table or view.
Synonyms for other synonyms can also be created, resulting in nested synonyms. A synonym can be used instead
of the original qualied table or view name in SELECT, INSERT, UPDATE, DELETE or LOCK TABLE
statements. Synonym for a table or a view can be created for tables or views that doesn't exist, but the target
table or view must be present before the synonym can be used.
Synonyms share the same namespace as tables or views. Synonyms name cannot be same as the name of an
already existing table/view.
A synonym can be dened for a table/view that does not exist when you create the synonym. If the table or view
doesn't exist, you will receive a warning message (SQLSTATE 01522). The referenced object must be present
when the synonym is used in a DML statement.
Nested synonym can be created(a synonym for another synonym), but any attempt to create a synonym that
results in a circular reference will return an error message (SQLSTATE 42916).
Synonyms cannot be dened in system schemas. All schemas starting with 'SYS' are considered system schemas
and are reserved by SQLFire.
A synonym cannot be dened on a temporary table. Attempting to dene a synonym on a temporary table will
return an error message (SQLSTATE XCL51).
Example
This command creates a synonym for a table:
CREATE SYNONYM EMP.PORTFOLIO FOR
EMP.PORTFOLIOTABLEWITHAVERYLONGNAME;
CREATE TABLE
Creates a new table using SQLFire features.
Syntax
CREATE TABLE table-name {
( {
Column Definition on page 493
|
Table ConstraintSyntax on page 495
}
[ , {
Column Definition on page 493
|
Table ConstraintSyntax on page 495
} ] * )
|
[ ( column-name [, column-name ] * ) ]
AS query-expression
WITH NO DATA
}
[
PARTITION BY Clause on page 498
491
SQL Language Reference