SQL/MX 2.x Reference Manual (H06.10+, J06.03+)

SQL/MX Statements
HP NonStop SQL/MX Reference Manual544517-008
2-69
CREATE SCHEMA Statement
CREATE SCHEMA Statement
Considerations for CREATE SCHEMA
Examples of CREATE SCHEMA
CREATE SCHEMA creates an SQL/MX schema. See Schemas on page 6-102.
CREATE SCHEMA with the optional location clause is an SQL/MX extension.
Syntax Description of CREATE SCHEMA
schema
is a schema name for the new schema. A simple schema name is an SQL
identifier. A schema name can also be of the form
catalog-name.schema-name.
AUTHORIZATION auth-id
specifies the owner of the schema. The default is the current authorization ID. The
auth-id must be the current authorization ID unless the current authorization ID
is a SUPER user. A SUPER user can specify any currently valid authorization ID
as the owner of the schema.
Enter an auth-id as a simple name, for example, "sql.user1". Because of
the “.” , you must enclose the user name in double quotes, the same as for a
delimited identifier.
You cannot specify PUBLIC as the auth-id, because a schema can have only
one owner.
CREATE SCHEMA schema-clause [schema-element
[, schema-element] ...]]
schema-clause is:
schema
| schema AUTHORIZATION auth-id
| schema AUTHORIZATION auth-id location-clause
| schema location-clause
location-clause is:
LOCATION subvolume [reuse-clause]
reuse-clause is:
REPEAT USE ALLOWED
schema-element is:
table-definition
| view-definition
| grant-statement
| index-definition