Microsoft SQL Server is a database to store information. Today I am going to spark some light on MS SQL Queries. This article is dedicated to beginners. Please have a look at the queries and cross verify with official documents.
Let's start with basics
1. Create Database: Create a new database with your name
Create database NameofDababase
Use database NameofDatabase
EXEC sp_renamedb 'oldname','newname'
Let's start with basics
1. Create Database: Create a new database with your name
Create database NameofDababase
Create Database SQLDemoDB2. Use database: Select a database where you want to work.
Use database NameofDatabase
Use database SQLDemoDB3. Rename Database: If you want to rename a particular database then use following query
EXEC sp_renamedb 'oldname','newname'
EXEC sp_renamedb 'SQLDemoDB','DemoDB'