SQL CREATE DATABASE

SQL CREATE DATABASE

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

Syntax

The basic syntax of this CREATE DATABASE statement is as following;

CREATE DATABASE DatabaseName;
The database name should be unique otherwise this statement would fail.

To see all databases you can execute the following query:

SELECT name FROM master.dbo.sysdatabases
or if you prefer

EXEC sp_databases