There are two methods to create an SQL database in MS SQL Server:

  • Using SSMS Framework

  • Using Queries

Steps to create a database using SQL Server Management Studio (SSMS) Framework:-

•    First launch SSMS Framework.
•    On SSMS's home page, you will see a dialog box, "Connect to Server." 
•    Click the Connect option to connect to an instance of the SQL Server Database Engine.

sql server management studio

  • Under the Object Explorer window, expand the Instance (Databases).

object explorer window 1

  • Right-click on Databases, and then select the New Database option.

New DataBase Window

  • In the New Database window, give the name of the database in the Database name field. For instance Test Database
  • If you want to create the database by accepting all default values, then click OK; otherwise, you can follow the additional steps as required.
  • Expand the newly created database (TestDatabase) to create table in it.

expand the newly created database

  • Go to Tables, right-click on it, select New>Table.

table in SSMS

  • Enter column name, data types, allow nulls (if required) into “Column Name”, “Data Type" and “Allow Nulls” fields.

table creation in ssms

  • Click on Save icon as shown below:

save icon in ssms

  • The Choose Name dialog box is displayed. Give a name for the table, and then click OK.

dialog box

How to Create SQL Database using queries?

  • In SSMS, in Object Explorer, connect to an instance of the SQL Server Database Engine.
  • Expand that instance, right-click on the Instance name, and then click New Query.

create sql database using query

  • Under the Query window, write the below query to create a database in MSSQL.
Create database New2Database; where New2Database is the Database name.
  • Click Execute option or press F5 to run the query.

create a database in MSSQL

  • Next, type the below query
 use New2Database
  • Click Execute option/ press F5 to run the query.

query window in ssms

  • Next, create a table in the database using the command below.
create table New1Database(id int,name varchar(90))
  • Click Execute option or F5 to run the query.

Your Database with a table and columns has been created as shown below:

table and columns in database

These steps result in the successful creation of a database named "New2Database" with a table named "New1Database," containing columns "id" and "name."

The KB provides a comprehensive guide for users to create MS SQL Server databases using both graphical and query-based methods.