SQL Tutorial on SQL CREATE Database

the sql create database statement is used to create a new sql database.

syntax

the basic syntax of this create database statement is as follows −

create database databasename;

always the database name should be unique within the rdbms.

example

if you want to create a new database <testdb>, then the create database statement would be as shown below −

sql> create database testdb;

make sure you have the admin privilege before creating any database. once a database is created, you can check it in the list of databases as follows −

sql> show databases;
+--------------------+
| database           |
+--------------------+
| information_schema |
| amrood             |
| tutorialspoint     |
| mysql              |
| orig               |
| test               |
| testdb             |
+--------------------+
7 rows in set (0.00 sec)