CREATE DATABASE
Introduced or updated: v1.2.339
Create a database.
Syntax
CREATE [ OR REPLACE ] DATABASE [ IF NOT EXISTS ] <database_name>
Access control requirements
Privilege | Object Type | Description |
---|---|---|
CREATE DATABASE | Global | Creates a database. |
To create a database, the user performing the operation or the current_role must have the CREATE DATABASE privilege.
Examples
The following example creates a database named test
:
CREATE DATABASE test;