Create a Database in SQL Server Management Studio

In this guide, I’ll show you how the steps to create a database in SQL Server Management Studio using a simple example.

Steps to Create a Database in SQL Server Management Studio

Step 1: Open SQL Server

To start, open Microsoft SQL Server Management Studio.

To avoid any permission issues, you may want run SQL Server Management Studio as an administrator:

SQL Server Management Studio

Step 2: Connect to your Server

Next, connect to your server:

SQL Server

Step 3: Navigate to the Object Explorer

After you connected to your server, you’ll be able to see the Object Explorer on the left-hand-side of your screen:

Object Explorer

Step 4: Create your Database

Under the Object Explorer, you’ll see the Databases Folder. Right click on that folder and then select New Database… from the drop-down list:

How to Create a Database in SQL Server Management Studio

Now you’ll be able to create your database by typing the name of your database in the entry box. For example, I typed the name of TestDB for my database. Once you’re done click on OK:

How to Create a Database in SQL Server Management Studio

If you expand the Databases folder under the Object Explorer, you’ll see your newly created database:

Create a Database in SQL Server Management Studio

An Alternative Way to Create a Database in SQL Server

You can also create a database in SQL Server Management Studio by using the following query:

CREATE DATABASE yourdatabasename

For example, if you want to create a second database, called mySecondDatabase, then execute this query:

CREATE DATABASE mySecondDatabase

Right-click on the Databases folder under the Object Explorer, and then select Refresh from the drop-down list:

Refresh Database
You’ll now see the second database that you just created:

SQL Express

Delete a Database in SQL Server

If you decide that a database is no longer needed, you can simply delete it by right-clicking on the database name (under the Databases folder), and then selecting the Delete option from the drop-down list.

For example, let’s say that you no longer need the mySecondDatabase database, then:

(1) Right-click on the mySecondDatabase

(2) Select the Delete option

Delete Database