ALLBASE/SQL Reference Manual (36216-90216)

Chapter 10 351
SQL Statements A - D
CREATE SCHEMA
CREATE SCHEMA
The CREATE SCHEMA statement creates a schema and associates an authorization name
with it. The schema defines a database containing tables, views, indexes, procedures, rules,
and authorization groups with the same owner name. Entries are created in the system
catalog views upon completion of the execution of this statement.
Scope
ISQL or Application Programs
SQL Syntax
CREATE SCHEMA AUTHORIZATION
AuthorizationName
[
TableDefinition
ViewDefinition
IndexDefinition
ProcedureDefinition
RuleDefinition
CreateGroup
AddToGroup
GrantStatement
][...]
Parameters
AuthorizationName
specifies the owner of the database objects.
If you have RESOURCE authority, the AuthorizationName must be your
DBEUserID, a class name, or an authorization group name to which you
belong. You cannot specify a different owner for the objects you create.
If you have DBA authority, the AuthorizationName can be any
DBEUserID, class name, or authorization group name. The owner of the
objects you create does not have to match the AuthorizationName if the
owner has DBA authority.
You must specify an AuthorizationName; there is no default.
TableDefinition
defines a table and automatic locking strategy. For complete syntax,
refer to the CREATE TABLE syntax.
ViewDefinition
defines a view of a table, another view, or a combination of tables and
views. For complete syntax, refer to the CREATE VIEW syntax.
IndexDefinition
creates an index on one or more columns. For complete syntax, refer
to the CREATE INDEX syntax.
ProcedureDefinition
creates a procedure which defines a sequence of SQL statements.
For correct syntax, refer to the CREATE PROCEDURE syntax.
RuleDefinition
creates a rule to fire a stored procedure. For complete syntax, refer to
the CREATE RULE syntax.
CreateGroup
defines an authorization group. For complete syntax, refer to the CREATE
GROUP syntax.