rename database sql command code example
Example 1: sql server rename database
ALTER DATABASE MyTestDatabase MODIFY NAME = MyTestDatabaseCopy ;
Example 2: rename table sql server
USE AdventureWorks2012;
GO
EXEC sp_rename 'Sales.SalesTerritory', 'SalesTerr';