Learning Objective
The objective of this tutorial is to teach you how to create a new database in SQL server usingCREATE DATABASE
statement or SQL Server Management Studio.
Introduction to CREATE DATABASE in SQL Server
The CREATE DATABASE statement is used to create a new database in SQL Server. You can create a database in SQL Server in two methods.- Using T-SQL i.e. using CREATE DATABASE statement
- Using SQL Server Management Studio
Creating a new database in SQL Server using CREATE DATABASE statement
You can create new database by issuing CREATE DATABASE statement.SQL Server CREATE DATABASE Syntax
The following is the syntax of SQL Server CREATE DATABASE statement.CREATE DATABASE databasename;In this syntax,
- CREATE DATABASE – Keyword to create new database in SQL Server.
- databasename – Name of the new database, you want to create in SQL Server.
SQL Server CREATE DATABASE Example
The below statement creates a new database named sampleDB.CREATE DATABASE sampleDB;Once the statement is completed successfully, you can check the name of the database using the below query which lists all the database name the SQL Server instance.
SELECT name FROM sys.databases ORDER BY name;

EXEC sp_databases;Alternatively, you can check in the object explorer by reloading the object list by clicking the Refresh button or by pressing F5 in the keyboard.

Creating a New Database Using SQL Server Management Studio
If you are more comfortable with the GUI, you can easily create a new database in SQL Server using SQL Server Management Studio. First right-click on the Databases folder and click on New Database option as below.


Summary
In this tutorial, you have learned how to create a new database in SQL Server using theCREATE DATABASE
statement and SQL Server Management Studio.