Instagram
youtube
Facebook
Twitter

MS SQL Server- Create Database

MS SQL Server CREATE DATABASE

  • A database is a collection of inter-related data organized in the form of tables, schemas, and views. It helps to retrieve, update, insert and delete data efficiently.
  • It provides two types of Databases: System databases and User databases
  • System Databases are automatically created in your system while installing. It supports database run perfectly.
  • User Databases are created by users like DBAs and testers.
  • There are basically two ways to create database: Using SQL Server Management Studio and using T-SQL.

Using SQL Server Management Studio

  • In Object Explorer, right-click on the Databases folder then select 'New Database'.
  • A new Dialog box appears on Screen, type a Database name, change the setting if required and click on OK.
  • Once the database is created, see the name of the database with the cylinder icon in the database folder by expanding it.

Using T-SQL

  • Select new Query on the standard bar.
  • Type the following query and select the query and click on execute on the standard bar.
CREATE DATABASE <Database_Name>;

For Example:

CREATE DATABASE student;

Once the database is created, click on refresh or press F5 to see the name of the database with the cylinder icon in the database folder by expanding it.