How to Create, Rename & Delete Database in SQL Server?
there are two way to create, rename & delete database in SQL server one is using SQL Query or Statement & other way is SQL server management studio.
Create, Rename & Delete database using SQL query:
For creating a new database minimal syntax is:
“CREATE DATEBASE database_name”
Example: Open “New Query” then write below code and “execute” it after execute right click on “Databases” and click “Refresh”
CREATE DATABASE abctutorial
For rename a database minimal syntax is
“ALTER DATABASE old_name MODIFY NAME = new_name ”
ALTER DATABASE abctutorial MODIFY NAME = abctutorial_New
For Dalete a database minimal syntax is
“DROP DATABASE database_name”
DROP DATABASE abctutorial_New
Create, Rename & Delete database using SQL server management studio:
Right click on “databases” then click “new database” after click new database open a new window as like below now write database name and click ok.
“Rename and Delete”: Right click on the database that you want to delete then click "delete" and for rename click "rename"