Previous Topic: ExampleNext Topic: Description


CREATE SYNONYM

This SQL statement can be executed in the following ways:

Through the CA Datacom Datadictionary Interactive SQL Service Facility (interactive)

In an application program prepared using a CA Datacom/DB SQL Preprocessor (embedded)

By using CA Dataquery (SQL & Batch Modes)

CREATE SYNONYM

YES

YES

YES

Note: YES indicates a valid execution method for this statement. To learn about using SQL keywords in CA Dataquery, see the CA Dataquery User Guide. For information about the access rights required to execute this statement, see the CA Datacom/DB Database and System Administration Guide.

The CREATE SYNONYM statement is a CA Datacom/DB extension. CREATE SYNONYM defines an alternative name for a table or view. You can use the synonym to reference a table in another schema without having to enter the qualified name. You can also define synonyms for tables or views in your default schema. When a CREATE SYNONYM statement successfully executes, a SYNONYM entity-occurrence is defined in CA Datacom Datadictionary in PRODuction status. The synonym is added to your default schema.

With regard to table partitioning, CREATE statements may not be issued against a table which is partitioned nor against a partition.

Note: For more information about table partitioning, see the CA Datacom/DB Database and System Administration Guide.

Following is the syntax diagram for the CREATE SYNONYM statement:

►►─ CREATE SYNONYM ─ synonym ─ FOR ─┬────────────┬─┬─ table-name ─┬───────────►◄
                                    └─ auth-id. ─┘ └─ view-name ──┘