SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Statements
HP NonStop SQL/MX Reference Manual—523725-004
2-68
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-104.
CREATE SCHEMA with the optional subvolume name 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.
LOCATION subvolume
optionally specifies the designated subvolume name for the schema. Ordinarily,
NonStop SQL/MX generates a subvolume name for the schema. However, in some
instances, you might need to specify the subvolume, such as when creating an
CREATE SCHEMA schema-clause [schema-element
[, schema-element] ...]]
schema-clause is:
schema
| schema AUTHORIZATION auth-id
| schema AUTHORIZATION auth-id LOCATION subvolume
| schema LOCATION subvolume
schema-element is:
table-definition
| view-definition
| grant-statement
| index-definition