How to create a New Database in SQL Server
As a Database developer or Administrator you will be required to create a New Database at some point.
You have two ways of doing that: Using SQL Server Management Studio (SSMS) interface or by using a T-SQL script. Let’s have a look at both options.
Create a new database using SSMS visual interface
- Open SSMS
- In Object Explorer (Left side of the application) Right Click on the Database node and click on New Database.
4. Click OK and that’s it.
Create a new database using T-SQL in SSMS
- Open up a new query window (CTRL + N)
- Paste the code below in the query window and change the name of the Database to the one you like.
CREATE DATABASE my_DBName
3. Execute the script by pressing F5 or by clicking on the Execute button.
4. Refresh the Database Node and that’s it.
I hope this information has been useful to you. Feel free to leave a comment of share this post.