📌  相关文章
📜  更改数据库名称脚本 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:52.461000             🧑  作者: Mango

代码示例1
USE master;  
GO  
ALTER DATABASE MyTestDatabase SET SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
ALTER DATABASE MyTestDatabase MODIFY NAME = MyTestDatabaseCopy ;
GO  
ALTER DATABASE MyTestDatabaseCopy SET MULTI_USER
GO