how to rename a database in tsql code example
Example 1: how to rename a database in tsql
Using t-sql
ALTER DATABASE [Test] MODIFY NAME = [Test2]
Example 2: how to rename a database in tsql
USE master;
GO
ALTER DATABASE AdventureWorks2012
Modify Name = Northwind ;
GO