Generally in SQL database means it is a place where we can store data in one place and use that data for transactions like insert, update, delete, etc… based on requirements. We can secure data in SQL database by providing access permissions based on users and we can use database for online transactions.
SQL Server database is a combinations of multiple tables, procedures, functions, etc… by using SQL database we can access data from anywhere based on requirement of applications. Here we will learn how to create sql server database using query or management studio.
To create SQL database we have two different methods one is using Query and another one is directly using SQL Server Management Studio.
By using “Create Database” statement we can create SQL database. Generally to create database in SQL our syntax will be like as shown below
Following statement is the syntax to create database in sql server
CREATE DATABASE DBNAME
Here “DBNAME” means name of the database
The following SQL statement will create new database with name “sqltutorialexamples”
CREATE DATABASE sqltutorialexamples
Once execute above sql create database statement it will create database in our server. We can find “sqltutorialexamples” database in SQL Server management studio under databases section like as shown below
To create new database open SQL Server Management Studio à Right Click on Databases section à Select New Database like as shown below
Whenever we click on “New Database” it will open New Database dialog popup in this we need to enter database name, owner (it’s optional), database path to store our database file (to see database path column scroll to right side) and click OK to create new database like as shown below
Once we click OK button it will create new database “sqltutorialexamples” for that refresh your database section and check it that would be like as shown below