SQL CREATE DATABASE Statement
The CREATE DATABASE
command in SQL is used to create a new, empty database. This is a fundamental step in setting up a database system.
CREATE DATABASE: Definition and Usage
Before you can start creating tables and storing data, you need to create a database to hold that data. The CREATE DATABASE
command is how you do this. You will need administrator or equivalent privileges to create a database.
Syntax
Syntax
CREATE DATABASE database_name;
Example
Creating a Database
This example creates a database named "testDB".
Syntax
CREATE DATABASE testDB;
Output
A new, empty database named "testDB" is created. You can verify this by using the command SHOW DATABASES;
(in MySQL) or a similar command for your specific database system to list all existing databases.