Skip to main content

CREATE DATABASE

Introduced or updated: v1.2.339

Create a database.

Syntax

CREATE [ OR REPLACE ] DATABASE [ IF NOT EXISTS ] <database_name>

Access control requirements

PrivilegeObject TypeDescription
CREATE DATABASEGlobalCreates 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;
Try Databend Cloud for FREE

Multimodal, object-storage-native warehouse for BI, vectors, search, and geo.

Snowflake-compatible SQL with automatic scaling.

Sign up and get $200 in credits.

Try it today