How to create a New Database in SQL Server

As a Database developer or Administrator you will be required to create a New Database at some point.

You have two ways of doing that: Using SQL Server Management Studio (SSMS) interface or by using a T-SQL script. Let’s have a look at both options.

 

Create a new database using SSMS visual interface

  1. Open SSMS
  2. In Object Explorer (Left side of the application) Right Click on the Database node and click on New Database.

 

Create new DB using SSMS UI3.  In The New Database Screen that pops up enter the Database Name.

4.  Click OK and that’s it.

Create new DB using SSMS UI step 2

Create a new database using T-SQL in SSMS

  1. Open up a new query window (CTRL + N)
  2. Paste the code below in the query window and change the name of the Database to the one you like.

            CREATE DATABASE my_DBName

Create DB using script

3.  Execute the script by pressing F5 or by clicking on the Execute button.

4.  Refresh the Database Node and that’s it.

Create new DB using SSMS UI step 3

I hope this information has been useful to you. Feel free to leave a comment of share this post.

Leave a Reply

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

ten − 9 =

Time limit is exhausted. Please reload the CAPTCHA.

Subscribe to our newsletter and stay up to date with:

  • Latest posts
  • News and Articles
  • Products, Promotions and Giveaways

Get our FREE step by step guide to Building SSRS reports 101

Hide me
Show me
Build an optin email list in WordPress [Free Software]