Create a schema

To create a schema, use the CREATE SCHEMA command.

mydb.admin(admin)=> CREATE SCHEMA schema_one;
CREATE SCHEMA

If you do not have the privileges required to create a schema, or if the system does not support multiple schemas in a database, the system displays an error message.

When you create a schema, the authorization user of the schema defaults to the user who created the schema. An authorization user is essentially the same as an owner of the schema. You can specify an authorization user when you create a schema or alter a schema.

Schema names can have a maximum length of 128 bytes, otherwise the system displays an error message. Schema names must be valid identifier names. For more information, see Handle SQL identifiers.