创建架构

创建架构 - 创建一个新的架构

句法

CREATE SCHEMA schema_name

描述

创建架构 creates a new schema. The schema name must be distinct from the name of any existing schema in the current database. A schema is essentially a namespace. It contains named objects, including tables, views, domains and stored procedures, whose names may duplicate those of other objects in other schemas. You access named objects by qualifying their names with the schema name as a prefix. The default behavior is that the creator of the schema and a user assigned the DBA role can create tables, views, domains and sequences in that schema. To give this privilege to another user, use the 授予 statement (see 授予)。 CREATE statement that specifies an unqualified object name creates the object in the current schema. You can also create a schema by declaring it with the statement (see )。 To remove a schema, specify 删除架构 (see 删除架构)。

参数

schema_name

要创建的模式的名称。此名称必须在当前数据库中的模式集中是唯一的。

必须授予新用户的DBA创建架构特权,以使新用户能够创建新模式。升级到Nuodb 4.0之前存在的任何用户将默认保留此权限

例子

CREATE SCHEMA newSchema;