Create Database in SQL Server using Query or Management Studio

  Keywords : How to create database in sql server using query, Create database in sql sever management studio, SQL server create database using script, Create database using sql server statements

Generally in SQL database means it is a place where we can store data in one place and use that data for transactions like insert, update, delete, etc… based on requirements. We can secure data in SQL database by providing access permissions based on users and we can use database for online transactions.


SQL Server database is a combinations of multiple tables, procedures, functions, etc… by using SQL database we can access data from anywhere based on requirement of applications.  Here we will learn how to create sql server database using query or management studio.

SQL Server Create Database using Query or Management Studio

To create SQL database we have two different methods one is using Query and another one is directly using SQL Server Management Studio.

Using Query to Create SQL Database

By using “Create Database” statement we can create SQL database. Generally to create database in SQL our syntax will be like as shown below

Syntax to Create SQL Database using Query

Following statement is the syntax to create database in sql server



 Here “DBNAME” means name of the database

Example to Create SQL Database

The following SQL statement will create new database with name “sqltutorialexamples


CREATE DATABASE sqltutorialexamples

 Once execute above sql create database statement it will create database in our server. We can find “sqltutorialexamples” database in SQL Server management studio under databases section like as shown below


After creating database in sql server using query

Create SQL Database using SQL Server Management Studio

To create new database open SQL Server Management Studio à Right Click on Databases section à Select New Database like as shown below  


Create database using sql server management studio


Whenever we click on “New Database” it will open New Database dialog popup in this we need to enter database name, owner (it’s optional), database path to store our database file (to see database path column scroll to right side) and click OK to create new database like as shown below


give name to create new database in sql server management studio


Once we click OK button it will create new database “sqltutorialexamples” for that refresh your database section and check it that would be like as shown below


After creating database in sql server using query