4D v13.4

CREATE SCHEMA

Home

 
4D v13.4
CREATE SCHEMA

CREATE SCHEMA  


 

 

 Command CREATE SCHEMACREATE SCHEMA sql_name

The CREATE SCHEMA command is used to create a new SQL schema named sql_name in the database. You can use any sql_name except for "DEFAULT_SCHEMA" and "SYSTEM_SCHEMA".

Note: For more information about schemas, please refer to the Principles for integrating 4D and the 4D SQL engine section.

When you create a new schema, by default the following access rights are associated with it:

  • Read-only (Data): <Everybody>
  • Read/Write (Data): <Everybody>
  • Full (Data & Structure): <Nobody>
    Each schema can be attributed external access rights using the GRANT command.

Only the Designer and Administrator of the database can create, modify or delete schemas.
If the access management system of 4D is not activated (in other words, if no password has been assigned to the Designer), all users can create and modify schemas with no restriction.

When a database is created or converted with 4D v11 SQL (starting with release 3), a default schema is created in order to group together all the tables of the database. This schema is named "DEFAULT_SCHEMA". It cannot be deleted or renamed.

Example  

Creation of a schema named "Accounting_Rights":

CREATE SCHEMA Accounting_Rights

 
PROPERTIES 

Product: 4D
Theme: SQL Commands

 
INDEX

Alphabetical list of commands

 
SEE ALSO 

ALTER SCHEMA