In this post, we will see how to easily create databases in SQL Server. To this end, we will see a relevant example along with a short video.
Connecting to SQL Server with SQL Server Management Studio (SSMS)
The first step, prior to creating the database, is to connect to SQL Server, in our example using SSMS.
To connect to the SQL Server instance, you launch SSMS, you set the connection details and connect to SQL Server.
Creating the Database
Now that you have successfully connected to SQL Server, you can right click on “Databases” and select “New database“. This brings up the following dialog:
Within the above dialog, you can enter the name of your new database, as well as, control the database autogrowth settings.
Database Settings
In the “Options” tab, you can set any other options you would like to set for your new database.
After clicking the “OK” button, you can see that your new database has been created:
Creating a new Database Using T-SQL
Alternatively, if you want to create a database using T-SQL, you can do so by executing the CREATE DATABASE
SQL statement, see the below example for more info:
CREATE DATABASE MyDatabase2; GO
Learn More about SQL Server
Enroll to my online course on Udemy, titled “SQL Server Fundamentals – SQL Database for Beginners” and get started with SQL Server on both Windows and Linux in no time!
Featured Online Courses:
- SQL Server Fundamentals – SQL Database for Beginners
- A Guide on How to Start and Monetize a Successful Blog
- Introduction to Azure Database for MySQL
- Working with Python on Windows and SQL Server Databases
- Boost SQL Server Database Performance with In-Memory OLTP
- Introduction to Azure SQL Database for Beginners
- Essential SQL Server Administration Tips
- Essential SQL Server Development Tips for SQL Developers
- Introduction to Computer Programming for Beginners
- .NET Programming for Beginners – Windows Forms with C#
- Introduction to SQL Server Machine Learning Services
- SQL Server 2019: What’s New – New and Enhanced Features
- Entity Framework: Getting Started – Complete Beginners Guide
- How to Import and Export Data in SQL Server Databases
Read Also:
- What are T-SQL Snippets in SSMS?
- Why Enforcing Regular Password Expiration is a Bad Practice
- What is SQL Server Management Studio?
- How to Write a “Hello World” App in Visual C++
- How to Write a “Hello World” App in C#
- How to Get Started with SQL Server – First Steps
- Benefits of Primary Keys in Database Tables
- How to Rebuild All Indexes Online for a SQL Server Database
- What’s the Best Allocation Unit Size when Formatting a USB Flash Drive?
- Difference Between SQL and SQL Server
- Software Review: SQLNetHub’s Snippets Generator
Featured Database Software Tool
SQLNetHub’s Snippets Generator
Create and modify T-SQL code snippets for use in SQL Server Management Studio, fast, easy and efficiently.
Enroll to the Course
Reference: {essentialDevTips.com} (https://www.essentialdevtips.com/)
© essentialDevTips.com
Rate this article:
Artemakis Artemiou is a Senior SQL Server Architect, Author, a 9 Times Microsoft Data Platform MVP (2009-2018). He has over 15 years of experience in the IT industry in various roles. Artemakis is the founder of SQLNetHub and {essentialDevTips.com}. Artemakis is the creator of the well-known software tools Snippets Generator and DBA Security Advisor. Also, he is the author of many eBooks on SQL Server. Artemakis currently serves as the President of the Cyprus .NET User Group (CDNUG) and the International .NET Association Country Leader for Cyprus (INETA). Moreover, Artemakis teaches on Udemy, you can check his courses here.