Answers for "change database name"

SQL
0

sql server rename database

ALTER DATABASE MyTestDatabase MODIFY NAME = MyTestDatabaseCopy ;
Posted by: Guest on January-12-2021
0

alter database name script

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
Posted by: Guest on July-06-2020
0

how to change database name in mysql

# Create a dump file for the database (logged via ssh):
mysqldump -u [UserName] -p[Password] -R [DB_Name] > [DB_Name].sql
# Create a new blank database by using the mysqladmin command:
mysqladmin -u [UserName] -p[Pasword] create [New_DB_Name]
# Import the dump file into the new database you created:
mysql -u [UserName] -p[Password] [New_DB_Name] < [DB_Name].sql
# Delete the old MySQL database name (optional):
mysqladmin -u [Username] -p[Password] drop [DB_Name]
Posted by: Guest on July-04-2021

Code answers related to "change database name"

Code answers related to "SQL"

Browse Popular Code Answers by Language