Previous Topic: CREATE RULENext Topic: Description


CREATE SCHEMA

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 SCHEMA

YES

YES

 

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

The CREATE SCHEMA statement creates a schema which defines an SQL environment. A schema exists for each authorization ID and contains all table, view, plan, and synonym definitions which are qualified by that authorization ID.

When a CREATE SCHEMA statement successfully executes, the name of the schema is defined in CA Datacom Datadictionary as an AUTHORIZATION entity-occurrence.

If the CA Datacom/DB Security Facility is installed at your site, you must be a global database owner to execute the CREATE SCHEMA statement.

Note: For information about global database owners, see the CA Datacom Security Reference Guide.

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 SCHEMA statement:

►►─ CREATE SCHEMA ─ AUTHORIZATION ─ auth-id ──────────────────────────────────►

 ►─┬────────────────────────────┬─┬────────────────────────────┬──────────────►◄
   │ ┌────────────────────────┐ │ │ ┌────────────────────────┐ │
   └─▼─┬─ table-definition ─┬─┴─┘ └─▼─ privilege-definition ─┴─┘
       └─ view-definition ──┘