HOME C C++ PYTHON JAVA HTML CSS JAVASCRIPT BOOTSTRAP JQUERY REACT PHP SQL AJAX JSON DATA SCIENCE AI

The SQL CREATE DATABASE Statement

The CREATE DATABASE statement is used to create a new SQL database.

Example

 CREATE DATABASE databasename;
 
You can click on above box to edit the code and run again.

CREATE DATABASE Example


The following SQL statement creates a database called "newDB":

Example

 CREATE DATABASE newDB;
 
You can click on above box to edit the code and run again.

Output


TIP: Make sure you have admin privilege before creating any database. Once a database is created, you can check it in the list of databases with the following SQL command: SHOW DATABASES ;