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;
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today