How to Create a Database in SQL Server: A Step-by-Step Guide SEO Description

Rumman Ansari   Software Engineer   2024-07-19 03:30:48   6308  Share
Subject Syllabus DetailsSubject Details
☰ TContent
☰Fullscreen

Table of Content:

A SQL Server database can be created, altered and dropped

1. Graphically using SQL Server Management Studio (SSMS) or
2. Using a Query

To create the database graphically

1. Right Click on Databases folder in the Object explorer
2. Select New Database
3. In the New Database dialog box, enter the Database name and click OK.

Step: 1

Create Database in SQL Server

Step: 2

Create Database in SQL Server

Step: 3

Create Database in SQL Server

To Create the database using a query

Create database DatabaseName

Whether, you create a database graphically using the designer or, using a query, the following 2 files gets generated.
.MDF file - Data File (Contains actual data)
.LDF file - Transaction Log file (Used to recover the database)



Stay Ahead of the Curve! Check out these trending topics and sharpen your skills.