How to Create Database in SQL Server

SQL Database: Definition

A database in Sql Server is a storage location where we can store our data. The SQL database uses tables to store our information in a normalizes way. So that, We can easily Select, Update and Delete the business data.

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

Syntax:

SQL> CREATE DATABASE demoDB;

Example:

If you want to create a new database <demoDB>, then the CREATE DATABASE statement would be used to creating a new database as shown below −

To Create new Database, make sure you are loged in as the administrator before creating any database. Once a database is created, you can view/check it in the list of databases as follows −


SQL> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| FRUITS             |
| aimtocode              |
| mysql              |
| orig               |
| test               |
| demoDB             |
+--------------------+
7 rows in set (0.00 sec)