SQL CREATE Database

SQL CREATE DATABASE statement to create new database. Oracle SQL you have to first create new database. Before you learn how to create new database you must have to know about SQL structure.

SQL structure is hierarchically, You first create database. Select database for USE. Now you are in selected database are. you are access all table as well as make new table and so many things you can done.

Syntax

You have to create new database use following SQL CREATE DATABASE syntax,

CREATE DATABASE database_name;

Example

SQL> CREATE DATABASE user_db;

SQL SHOW DATABASE Statement

SQL SHOW DATABASE statement to display list of all created database.

SQL> SHOW DATABASES;

+---------------------+
| Database            |
+---------------------+
| information_schema  |
| scott               |
| user_db             |
| demodb              |
+---------------------+ 
4 rows in set (0.01 sec)