04 – Creating A Database

Table of Contents

In this post I will explain how to create a database in our newly installed SQL Server instance.

There are two ways to create a database in SQL Server. The easy way and the hard way. The hard way involves Structured Query Language.

The Easy Way

Open up your SQL Server and log in.

In the Object Explorer right click on Database and select New Database.

Screenshot 2014-02-03 10.37.12A form will pop up. Add the name of the database to Database name. We have chosen TestDB.

Click on OK.

Screenshot 2014-02-03 10.37.55In the Object Explorer your database should appear under Databases. If it doesn’t, follow the rest of the post and you will find out how to make it appear.

Screenshot 2014-02-03 10.38.30

The Hard Way

On the toolbar click on New Query

Screenshot 2014-02-03 10.40.07A tab will open up. Write

CREATE DATABASE TestDB1;

Click on Execute in the toolbar.

Screenshot 2014-02-03 10.40.53If your SQL statement is correctly written, you will get a message in the Messages tab.

Screenshot 2014-02-03 10.41.08In the Object Explorer right click on Databases, and at the bottom of the drop-down menu select Refresh.

Screenshot 2014-02-03 10.41.17Your database should appear in the Object Explorer.

Screenshot 2014-02-03 10.41.26OK, so the second way wasn’t that difficult. But you did have to write some SQL.

Leave a Reply

Your email address will not be published. Required fields are marked *

Visit Us On TwitterVisit Us On FacebookVisit Us On Youtube