How to create a database in a Microsoft SQL server?

Asked 14-Sep-2021
Viewed 276 times

0

How to create a database in a Microsoft SQL server also write query?


1 Answer


0

Create Database in SQL Server :

    There are generally two way to create a new Database in SQL Management Server, that is- 

1- By the use of SQL query  The SQL query which is use to create a new Database is as- 

                           Syntax-         CREATE DATABASE database_name ;

    Ex-                 CREATE DATABASE Employees ;

                                                     How to create a database in a Microsoft SQL server?

2- Create new Database using SQL Management Studio

    To create a new Database in SQL server management studio firs you open SQL Server Management Studio in your Computer then go to 'Object Explorer'.

I- In Object Explorer select your server name and explore it then you have find Database Folder then Right Click on Database folder and Select 'New Database'  option like as in following picture-

                                                                   How to create a database in a Microsoft SQL server?

II- After click on 'New Database' option a new window is appear on your Screen. Write your Database name as you have then click on 'OK'.

                                                             How to create a database in a Microsoft SQL server?

III- You have find your database in Database folder of Object Explorer.

                                                                              How to create a database in a Microsoft SQL server?