SQL CREATE Database

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

SQL Syntax:

Basic syntax of CREATE DATABASE statement is as follows:

CREATE DATABASE DatabaseName;

Always database name should be unique within the RDBMS.

Sql Example:

If you want to create new database <testDB>, then CREATE DATABASE statement would be as follows:

SQL> CREATE DATABASE testDB;

Make sure you has admin previledge 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)

Learn To Create Complex Databases at kurdsofts.net website.

Both comments and pings are currently closed.

Comments are closed.

Designed for Mytoptutorials.com