How To Create A New Database In Microsoft Sql Server Management Studio

Databases in Microsoft Sql Server are very crucial to help you store and manage your crucial data. As a developer, you will deal with the very basic task of creating a new database in your SQL server. In this article, I will walk you through all the possible approaches to create a new database in SQL Server.

How To Create A New Database In Microsoft Sql Server Management Studio

Let us discuss all possible approaches individually.

Approach-1 Using SQL Server Management Studio (SSMS)

To create a new database in Microsoft SQL Server Management Studio, follow the below steps.

1. Open SQL Server Management Studio (SSMS) and connect to your database server instance.

2. Right-click on the Databases folder and select the New Database option, as shown in the screenshot below.

How To Create A New Database In Microsoft Sql Server Management Studio

3. Enter the new database name and then click on the OK button.

how to create a new database in sql server management studio

Now, expand the Databases folder, and you will see that the new database has been created successfully.

create a new database in sql server

Check out How To Get The Connection String From SQL Server

Approach-2 Using SQL Query

We can execute the below CREATE DATABASE statement

CREATE DATABASE databasename;

We can create a new database named DatabaseFAQs using the below query.

CREATE DATABASE DatabaseFAQs;

After executing the above query, the new database was created successfully, as shown in the screenshot below.

how to create a new database in sql server 2019

Now, right-click on the Databases folder and select the Refresh option per the screenshot below.

how to create sql server database

You can see now that the new database has been created successfully. See the screenshot below for your reference.

how to create a database in microsoft sql server

Conclusion

Creating a new database in Microsoft Sql Server Management Studio is a basic task for a developer and SQL DBA. As mentioned in this article, one can use either the SSMS design approach or the CREATE DATABASE statement to create the database quickly.

You may also like following the articles below.

Top 200 SQL Server Interview Questions and Answers

Free PDF On Top 200 SQL Server Interview Questions And Answers

Download A 40 pages PDF And Learn Now.