Latest Post

Saturday, 23 September 2017

How to Create a New Database in Microsoft SQL Server


I am going to share this post for the new user who is not familiar with SQL server to how can they create a new database using SQL server.
We can create database via 2 ways in SQL server, first one is by using SQL server wizard and second is using SQL query.

  • Creating database using Sql server query
  • Creating database using Sql server wizard
Here i will describe both 2 way so that you can create database as per your choice.

Creating database using Sql server query

If we are creating new database by using Sql query then we need to use SQL CREATE DATABASE Statement.
The CREATE DATABASE statement is used to create a new SQL database.
Syntax

CREATE DATABASE databasename;

Example
The following SQL statement creates a database called "test":
CREATE DATABASE test;


Creating database using Sql server wizard

  • Open Microsoft SQL Management Studio
  • Connect to the database engine using database administrator credentials
  • Expand the server node
  • Right click Databases and select New Database

  • Enter a database name and click on OK to create the database



Government Jobs